this is my code:
using (Process game = Process.Start(new ProcessStartInfo() { FileName=\"DatabaseCheck.exe\", RedirectStandardOu
while (!proc.HasExited) { proc.Refresh(); if (proc.MainWindowHandle.ToInt32() != 0) { return proc.MainWindowHandle; } }