Can you launch a process on top of the topmost window? (csharp wpf)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chris seigel
    New Member
    • Nov 2011
    • 1

    Can you launch a process on top of the topmost window? (csharp wpf)

    Can you launch a process on top of the topmost window? (csharp wpf)
    I have the following, but the current window before this one ( a wpf window using window class that has topmost=true ), remains on top of the process when the process is launched..

    Code:
     if (System.IO.File.Exists(AIR_HELP_APP_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_);
    }
Working...