|
-
Nov 8th, 2004, 11:16 AM
#1
Thread Starter
New Member
Closing Programs (Resolved)
I have created some code (with sum help from a few guys on here), to open a specific program, and load a saved file for it. What i now need is some coding to close the program i open after it finishes.
It runs this program constantly, every 30 seconds, and each time it opens it seperately, as opposed to just re-running the specified file. This is the code im using:
Shell "C:\Program Files\Ghost Mouse\Gmouse.exe c:\documents and settings\ben\desktop\cargo to can.gms"
Can any one provide me with some code to close this specific file after it has been created?
Thanks in advance
*I looked through the forums for anyone else having this problem, and some bright spark replied to a similar post with:
Private Sub Command1_Click()
End
End Sub
Im not sure if he was having a joke, ( ) but it wasnt perticularly helpful as all it does is close the VB App.. not the specified file.
Last edited by bob.11; Nov 9th, 2004 at 02:31 AM.
-
Nov 8th, 2004, 11:54 AM
#2
Hyperactive Member
The question I have is.. how will you determine when the program is finished its work to determine whether or not to close it?
VB.NET 2005 Express with .Net 2.0
C# 2010 .Net 4.0
-
Nov 8th, 2004, 01:50 PM
#3
Thread Starter
New Member
Because i know exactly how long it runs for...
All i need is an answer.. not a smart alec remark
-
Nov 8th, 2004, 02:02 PM
#4
Hyperactive Member
Not a smart alec remark, I asked because there is an API call that will launch a program and wait for it to exit. Once it exits it returns execution to your program.
One of the ShellExecute functions I think it is.
VB.NET 2005 Express with .Net 2.0
C# 2010 .Net 4.0
-
Nov 8th, 2004, 02:21 PM
#5
Thread Starter
New Member
Sorry... I didnt mean to be rude. I have heard of that, but I went for the simple approach.. lol
All I need is a line of code to kill a certain application. But it seems its not that simple, as if anything is anymore.
-
Nov 8th, 2004, 06:08 PM
#6
Software Eng.
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
|