message

S

sarah

I have a process that runs and takes a long time.
I would like to display a message and change the cursor while the user waits.
Wht kind of message box or other feature could i use to do this and how
would i fit it in with my code?
This is the code for the sub procedure:

Public Sub ExecCmd(cmdline$)
Dim proc As PROCESS_INFORMATION
Dim start As STARTUPINFO
Dim ReturnValue

' Initialize the STARTUPINFO structure:
start.dwFlags = STARTF_USESHOWWINDOW
start.cb = Len(start)

start.wShowWindow = 6
' Start the shelled application:
ReturnValue = CreateProcessA(0&, cmdline$, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)

' Wait for the shelled application to finish:
Do
ReturnValue = WaitForSingleObject(proc.hProcess, 0)
DoEvents
Loop Until ReturnValue <> 258

ReturnValue = CloseHandle(proc.hProcess)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top