Can I start the process on top of the top window? (csharp wpf) I have the following, but the current window before it (the wpf window using the window class with topmost = true) remains at the top of the process when the process starts.
if (System.IO.File.Exists(MY_CALC_PATH))
{
System.Diagnostics.Process helpProcess = new System.Diagnostics.Process();
helpProcess.StartInfo.FileName = "calc.exe";
helpProcess.Start();
helpProcess.WaitForInputIdle();
BringWindowToTop(helpProcess.MainWindowHandle);
SetWindowPos(helpProcess.MainWindowHandle, myCurrentTopmostWinHnd, 0, 0, 0, 0, SWP_NOSIZE_);
}
Chris source
share