OnProgress Event  

The OnProgress event is generated during data transfer.


Sub object_OnProgress ( [Index As Integer], ByVal MessageNumber As Variant, ByVal MessageSize As Variant, ByVal MessageCopied As Variant, ByVal Percent As Variant )


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:

The number of the message that is being retrieved. If a message is being created, this argument will have a value of zero.
The size of the message being transferred in bytes. This value may be zero if the control cannot obtain the size of the message from the server.
The number of bytes that have been transferred between the client and server.
The percentage of data that's been transferred, expressed as an integer value between 0 and 100, inclusive. If the size of the message on the server cannot be determined, this value will always be 100.

Note that this event is only generated when message data is transferred using the CreateMessage, GetHeaders or GetMessage methods. 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

Message Property, MessagePart Property, CreateMessage Method, GetHeaders Method, GetMessage Method