Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Process[] processes = Process.GetProcesses();
- foreach (var process in processes)
- {
- Console.WriteLine("Process Name: {0} ", process.ProcessName);
- if (process.ProcessName.Contains("chrome"))
- {
- IntPtr handle = process.MainWindowHandle;
- SetForegroundWindow(handle);
- SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOZORDER);
- }
- }
- MessageBox.Show("OK");
Add Comment
Please, Sign In to add comment