Results 1 to 7 of 7

Thread: message

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    83

    Resolved message

    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
    Last edited by smileyface5; Mar 2nd, 2005 at 06:28 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width