|
-
Oct 7th, 1999, 03:38 PM
#1
Thread Starter
New Member
I am using this code, but it runs in the foreground when I want it to be hidden can anyone tell me the correct syntax to do this.
Dim CmdLine$
If Not IsMissing(CommandLine) Then
CmdLine$ = ToRun & " " & CommandLine
Else
CmdLine$ = ToRun
End If
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
Dim Ret&
wShowWindow = sw_hide
' Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
' Start the shelled application:
Ret& = CreateProcessA(0&, CmdLine$, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc)
' Wait for the shelled application to finish:
Ret& = WaitForSingleObject(proc.hProcess, INFINITE)
Ret& = CloseHandle(proc.hProcess)
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|