hi,be more specific you want to kill the process through a vb program..
or you just want to kill process in any way..you can use task manager to end a program..
or you can go command prompt use tasklist and tskill to end a program..
or if you want to do it in vb check out System.Diagnostics.Process
cguan_77
Nearly a Posting Virtuoso
1,317 posts since Apr 2007
Reputation Points: 19
Solved Threads: 115
...if you want to do it in vb check out System.Diagnostics.Process
Sure, If you are using .NET.... not gonna work in vb 4/5/6. I can get you the code to kill a process from within VB6, but figuring out how to know if it's the one you want to kill or not is a different story altogether. I suppose you could kill all copies of java, and then just open the one you want ?
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
cguan_77
Nearly a Posting Virtuoso
1,317 posts since Apr 2007
Reputation Points: 19
Solved Threads: 115
I'll say it again......
you're in the VB 4/5/6 forum. System.Diagnostics.Process is for VB.NET, NOT VB 4/5/6. If you want answers about it, then ask there. Not Here.
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
use
System.Diagnostics.Process.GetProcessesByName(processName);
to get all the process with this name. After this use the process properties like, process.ModuleName etc. to get the required process, then kill the process by calling function process.kill().
This section just for vb4/5/6. Don't make it become VB.Net Section...
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
Sure, If you are using .NET.... not gonna work in vb 4/5/6. I can get you the code to kill a process from within VB6, but figuring out how to know if it's the one you want to kill or not is a different story altogether. I suppose you could kill all copies of java, and then just open the one you want ?
i could really use this code you were talking about. thanks
crackerjacker
Junior Poster in Training
53 posts since Sep 2008
Reputation Points: 8
Solved Threads: 3