C# Process.MainWindowHandle always returns IntPtr Zero
this is my code: using (Process game = Process.Start(new ProcessStartInfo() { FileName="DatabaseCheck.exe", RedirectStandardOutput = true, CreateNoWindow = true, UseShellExecute = false })) { lblLoad.Text = "Loading"; int Switch = 0; while (game.MainWindowHandle == IntPtr.Zero) { Switch++; if (Switch % 1000 == 0) { lblLoad.Text += "."; if (lblLoad.Text.Contains("....")) lblLoad.Text = "Loading."; lblLoad.Update(); game.Refresh(); } } Problem is, that game.MainWindowHandle is always IntPtr.Zero. I need to find the IntPtr of the ran process to confirm that the game was started by the launcher,