Link to home
Start Free TrialLog in
Avatar of AnnaJames77
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

ASKER CERTIFIED SOLUTION
Avatar of Farzad Akbarnejad
Farzad Akbarnejad
Flag of Iran, Islamic Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AnnaJames77
AnnaJames77

ASKER

THANK YOU THANKYOU FarzadA: that worked. Can you please let me know what does the doevents used for?
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