The OnTaskRun event occurs while a background task is
Sub object_OnTaskRun (
[Index As Integer],
ByVal TaskId As Variant,
ByVal TimeElapsed As Variant,
ByVal Completed As Variant
The OnTaskRun event is generated periodically during a file
transfer while the background task is active. The arguments to this
- An integer value that uniquely identifies the background task.
- An integer value that specifies the amount of elapsed time in milliseconds.
- An integer value that specifies an estimated percentage of
The rate and number of times that this event will be generated
depends on the task being performed. This event is generally analogous
to the OnProgress event for file transfers that are performed
in the current working thread, however the OnTaskRun event will
occur for each individual background task that is active. The
TimeElapsed parameter specifies the amount of time that the task
has been active, and the Completed parameter specifies an
estimated percentage of completion. This can be used to update the
user interface if needed, however it is the application's
responsibility to determine which UI component (such as a
ProgressBar control) is associated with a particular task.