|
Previous Top Next |
Prototype: | (Long pValueToAdd) |
pValueToAdd | Indicates the value to add to the CurrentValue property |
This method adds the passed in value to the CurrentValue property and then calls the ShowProgress to update the progress bar and any related controls. Normally you do not need to call this method directly, but if you are dealing with progress bars that are not determined by a simple counter, then this is the method to call. For example if you are reading a DOS file with a 4K buffer you can use this method instead of Update and pass the size of the buffer read to it to update it correctly.
Example:
ITP ITProgressClass
Q1 Queue
F1 Long
End
Q2 Queue
F2 Byte
End
I Long
Code
!! Queues are filled here.
ITP.Init(?Progress1,Records(Q1),True) !! Initialize with the number of records from Q1
ITP.AddToCurrentValue(Records(Q2)) !! Add the number of records from Q2
Loop I = 1 To Records(Q1)
Get(Q1,I)
!! Do something
ITP.ShowUpdateProgress(1)
End
Loop I = 1 To Records(Q2)
Get(Q2,I)
!! Do something
ITP.ShowUpdateProgress(1)
End
ITP.Kill
See also: