|
-
Nov 8th, 2004, 03:23 AM
#1
Thread Starter
New Member
Use VB to close an external Application (Resolved)
I have got VB to open my file, and run it using the Shell command, but is there a way to make VB close the program I opened after it has finished?
My program ends up running the same file multiple times, and it would be easier if it could close the program's automatically.
Any help would be Appreciated
(P.S. I dont want a code to close the VB application )
Last edited by bob.11; Nov 9th, 2004 at 02:30 AM.
-
Nov 8th, 2004, 04:30 PM
#2
Software Eng.
Look into the TerminateProcess API.
You'll also need to use CreateToolhelp32SnapShot in conjunction with Process32First and Process32Next to retrieve the handle from the process ID (the process ID is the return value of VB's Shell function)
-
Nov 8th, 2004, 05:42 PM
#3
Thread Starter
New Member
Thanks. I'll give it a try and get back to you
-
Nov 8th, 2004, 06:16 PM
#4
Frenzied Member
postmessage
n tell the window to close
these simple tasks would be easier on you if you are using the API Guide found at http://allapi.net AND API Spy from http://patorjk.com
:::`DISCLAIMER`:::
Do NOT take anything i have posted to be truthful in any way, shape or form.
Thank You!
--------------------------------
"Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
"Finaly I can look as gay as I want..." - NoteMe
Languages: VB6, BASIC, Java, C#. C++
-
Nov 9th, 2004, 02:30 AM
#5
Thread Starter
New Member
Hehehe... Well I got it working, thanks for the advice guys
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
|