|
The OnProgress event is generated during data transfer.
Syntax
Sub object_OnProgress ( [Index As
Integer], ByVal FileName As Variant,
ByVal FileSize As Variant, ByVal
BytesCopied As Variant, ByVal Percent
As Variant )
Remarks
The OnProgress event is generated during the transfer of
data between the client and server, indicating the amount of data
exchanged. For transfers of large amounts of data, this event can be
used to update a progress bar or other user-interface control to
provide the user with some visual feedback. The arguments to this
event are:
- FileName
- A string which specifies the name of the file currently being
transferred. This always corresponds to the name of the file on the
server.
- FileSize
- The size of the file being transferred in bytes. This value may
be zero if the control cannot obtain the size of the file from the
server. If the total number of bytes is less than 2 GiB, the value
will be a Long (32-bit) integer.
For very large transfers, it will be a Double
floating-point value.
- BytesCopied
- The number of bytes that have been transferred between the
client and server. If the number of bytes copied is less than 2 GiB,
the value will be a Long (32-bit) integer. For very
large transfers, it will be a Double floating-point
value.
- Percent
- The percentage of data that's been transferred, expressed as an
integer value between 0 and 100, inclusive. If the size of the file
on the server cannot be determined, this value will always be
100.
This event is only generated when a file is transferred
using the GetFile or PutFile methods, or equivalent
actions. If the client is reading or writing the file data directly
to the server using the Read or Write methods then the
application is responsible for calculating the completion percentage
and updating any user interface controls.
See Also
TransferBytes Property,
TransferRate Property,
TransferTime Property,
GetData Method,
GetFile Method,
PutData Method,
PutFile Method,
OnGetFile Event,
OnPutFile Event
|
|