Function ProgressDialog( ByVal nCommand&, ByRef sDlgTilte$, _
ByRef sDlgText$, ByVal nPercent& ) As Long
Purpose: Display a progress dialog.
Works in: OneLiner and Power Flow.
Parameters:
nCommand [in] Display mode:
0- Hide the dialog
1- Display the modeless dialog with Cancel button enabled
2- Display the modeless dialog with Cancel button disabled.
sDlgTilte [in] Dialog title string
sDlgText [in] Progress text string
nPercent [in] Percent progress (must be between 0-100)
Return value:
2 Cancel button pressed
0 No button pressed
Remarks: The progress dialog is modeless, which allows the script execution to continue without interruption.
Example:
Sub Main
Print "Start"
For ii = 1 to 100
For jj = 1 to 1000000
Next
Button = ProgressDialog( 1, "My Dialog", "Progress =" + Str(ii) +"%", ii )
If Button = 2 Then
Print "Cancel button pressed"
GoTo Done
End If
Next
Print "done"
Done:
Call ProgressDialog( 0, "", "", 0 )
End Sub