|
-
Oct 28th, 2002, 06:53 PM
#1
Thread Starter
Hyperactive Member
Closing an Application Window
Hi Guys,
I am running an external app from my prog and on some systems, its window remains open after it has finished. I don't want this to happen, so my question is: How do i ensure that the app window is closed when it finishes?
We don't know what's wrong. . . So the best bet might be to remove something surgically.
-
Oct 28th, 2002, 07:00 PM
#2
Addicted Member
Re: Closing an Application Window
Originally posted by Blinky Bill
Hi Guys,
I am running an external app from my prog and on some systems, its window remains open after it has finished. I don't want this to happen, so my question is: How do i ensure that the app window is closed when it finishes?
Hehe, I just posted a similar question. What method are you using to run the external application?
-
Oct 28th, 2002, 07:10 PM
#3
Thread Starter
Hyperactive Member
This is the code i'm using
VB Code:
Public Function ExecCmd(cmdline$)
Dim proc As PROCESS_INFORMATION
Dim start As STARTUPINFO
Dim ret&
start.cb = Len(start)
ret& = CreateProcessA(0&, cmdline$, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)
ret& = WaitForSingleObject(proc.hProcess, INFINITE)
ret& = CloseHandle(proc.hProcess)
End Function
This is courtesy of MuzzaD who provided me with it earlier today.
We don't know what's wrong. . . So the best bet might be to remove something surgically.
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
|