AnnaJames77
asked on
VB6 Please wait message
In the below code if the user selects OK button of the msg box, it executes 2 functions show1 and scan1. As its a timeconsuming process i need to display a 'please wait' msg for the user.
i tried using frame, but it displays after the 2 funs are run.
testmsg = MsgBox("Try Again,", 1, "Try Again!")
If testmsg = 1 Then
waitFrame.Visible = True
show1 //function1
scan1 //function2
Exit Sub
Else
Exit Sub
waitFrame.Visible = false
End If
i tried using frame, but it displays after the 2 funs are run.
testmsg = MsgBox("Try Again,", 1, "Try Again!")
If testmsg = 1 Then
waitFrame.Visible = True
show1 //function1
scan1 //function2
Exit Sub
Else
Exit Sub
waitFrame.Visible = false
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello,
DoEvents switches control to the operating-environment kernel. Control returns to your application as soon as all other applications in the environment have had a chance to respond to pending events. This doesn't cause the current application to give up the focus, but it does enable background events to be processed. Other applications also includes other window (Windows and Controls) in your VB application.
-FA
DoEvents switches control to the operating-environment kernel. Control returns to your application as soon as all other applications in the environment have had a chance to respond to pending events. This doesn't cause the current application to give up the focus, but it does enable background events to be processed. Other applications also includes other window (Windows and Controls) in your VB application.
-FA
ASKER