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

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

Thanks alot for the reply. I am at work at the moment but I will try this as soon as I get home :)

Ryan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.