Archive for the ‘VB.Net’ Category

How to get and Kill the Processes Using   Leave a comment

hello fnds i am come back after long break .. but here is interesting topic for you… How to Get and Kill the Process using…

ok … We know has a many inbuilt Classes Which help us to Full fill our requirement ….


1. First Start Visual basic and Create new Windows Application … Call Task-handler ….
2. Now … you can see one form …. in form add one listbox and three buttons …. call GetProcess,Kill and Close…. it’s look like this ….

 3. ok… double Click on GetAll Process Button and it can open new Code Windows … In this Write Following Code ….

    Dim pro() As Process
    pro = Process.GetProcesses
    For Each proc As Process In pro

4. This Can add the All Process in Listbox1…

5.Now Code for Kill Button .. Open the Code Window Of Kill button and Write Following Code ….

 Dim pr() As Process = Process.GetProcessesByName(ListBox1.SelectedItem)
        For Each p As Process In pr

6. Ok to kill Process First Select Process From ListBox and then Press Kill button …..
Done the mini task-manager is ready for you enjoy ….. it …
This is a Basic you can manipulate It According to  your Logic…..

Download Sample Code From Here… (Click me…)

Posted December 9, 2011 by smarthacker5 in VB.Net