I want to close all active window If the program detects any active window, it will close it opps sorry, my bad, i have to change the title
Ctrl + Alt + Delete or assign hot key to do it http://www.ntwind.com/software/utilities/close-all.html
It will check if the window is active and close it by logged user: [C#] Code: foreach (Process MainProc in Process.GetProcesses(Environment.MachineName)) //ForEarch all logged user processes { if (MainProc.MainWindowHandle != IntPtr.Zero) //Check if the current process have an window { MainProc.Kill(); //Kill the process if pass on the window check } } [VB] Code: For Each MainProc As Process In Process.GetProcesses(Environment.MachineName) If (MainProc.MainWindowHandle <> IntPtr.Zero) Then MainProc.Kill() End If Next