Thank for your answers, but the result is the same.
I let the progress run to the end but it does not automatically close.
I tried some ways:
I change Me.Close by:
Me.Hide = same result, the dialog still appears
ProgressBar2.Visible = False = ProgressBar2 disappears
Quit = when I click Cancel
I understood.
Thank you.
--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3.
Spend less time writing and rewriting code and more time
Hi,
I want create a dialog form which showes the current progress and let user
stop the operation and close this dialog by clicking a Cancel button
On form1 I have 2 progress bars and 1 button:
Private shouldStop as Boolean
Private Sub Form_Open()
shouldStop = False
Me.Show()
doIt() 'Main loop
You have to specify a delay to Wait. From the docs:
If Delay is not specified, the function processes all pending events and
returns immediately. In that specific case, input events (keyboard and mouse)
are ignored.
Try it like this:
Public Sub Form_Open()
shouldStop = False
Me.Show
doIt