User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 455,985 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,759 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 759 | Replies: 2
Reply
Join Date: Dec 2007
Posts: 17
Reputation: Mr Brownstone is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
Mr Brownstone's Avatar
Mr Brownstone Mr Brownstone is offline Offline
Newbie Poster

Ending Processes through VB.NET script?

  #1  
Dec 1st, 2007
Hi my Name is Ryan and I am currently doing a college project in VB.net

I have wrote a few programs in VB.net but for this current project I really need help...

Is there anyway of ending processes (such as explorer) from a click of a button in a VB.Net program.

I need to click a button and it will close explorer etc.

By the way I am using Visual Studio 2005 Express if that helps.

Thanks

Ryan
Last edited by Mr Brownstone : Dec 1st, 2007 at 7:25 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Location: England
Posts: 156
Reputation: ptaylor965 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 19
Sponsor
ptaylor965's Avatar
ptaylor965 ptaylor965 is offline Offline
Junior Poster

Re: Ending Processes through VB.NET script?

  #2  
Dec 1st, 2007
You need to get all processes the match the name of your application in an array()
Then Kill each one
Dim myProcesses As Process() = Process.GetProcessesByName("iexplore")
Dim myProcess As Process
For Each myProcess In myProcesses
   myProcess.Kill()
Next myProcess
Last edited by ptaylor965 : Dec 1st, 2007 at 8:43 am. Reason: Added pre-code text
Peter Taylor
Visual Basic.NET Application Developer

TaylorsNet
http://www.taylorsnet.co.uk
Reply With Quote  
Join Date: Dec 2007
Posts: 17
Reputation: Mr Brownstone is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
Mr Brownstone's Avatar
Mr Brownstone Mr Brownstone is offline Offline
Newbie Poster

Re: Ending Processes through VB.NET script?

  #3  
Dec 1st, 2007
Thanks alot for the reply. I am at work at the moment but I will try this as soon as I get home

Ryan
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 9:27 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC