|
-
Sep 21st, 2011, 04:48 PM
#1
Thread Starter
Lively Member
Kill process?
Hi guys.
I have 2 buttons.
Button1:
Process.Start(start.bat)
and when I press button2 , I want start.bat to close..
How I can do that ????
-
Sep 21st, 2011, 09:46 PM
#2
Re: Kill process?
Create an object of Process class and use it to start it. After finishing you could kill that process via that object itself. Details: http://visualbasic.about.com/od/usingvbnet/a/prstrt.htm
Otherwise, you could kill process that you want by using this way: http://vbnetsample.blogspot.com/2007...l-process.html
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 21st, 2011, 11:17 PM
#3
Re: Kill process?
Your already creating a Process object. Process.Start returns a Process object. Just call Kill on that object.
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
|