Support Forums

Full Version: [VB6] Whats the best way to kill a program?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I find it quite often that my programs always end up in my proccesses even after they're closed :\, what am I doing wrong?
(08-25-2010, 03:00 AM)`P R O D I G Y™ Wrote: [ -> ]I find it quite often that my programs always end up in my proccesses even after they're closed :\, what am I doing wrong?

make sure the program is set to exit process on form1 close

Big Grin
Start task manager , select the application you want to end process , than right click and choose go to process after selecting the specific process right click again , a menu will popup , select end process OR end process tree to end the process..
There will be no alteration in other running applications !
I mean in code, not manually... Jeez
Code:
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("process name")

For Each p As Process In pProcess
p.Kill()
Next

Haven't tested this but it should work. (You will have to convert to VB6)
Ah, okay. I thin Unload Me, works aswell. Thank you!