find the System.Windows.Window object for a given process

  • Thread starter Thread starter Jay Meerdink
  • Start date Start date
J

Jay Meerdink

If my WinForms app uses System.Diagnostics.Process to fire up another
app such as Notepad, is there a System.Windows.Window object that
corresponds to that instance of Notepad?
 
If my WinForms app uses System.Diagnostics.Process to fire up another
app such as Notepad, is there a System.Windows.Window object that
corresponds to that instance of Notepad?

If you're referring to the Notepad's ID then you can check Process.ID,
If you need the handle of process in kernel, that is, notepad, use
Process.Handle property. Note that Process.Handle is IntPtr.

HTH,

Onur Güzel
 
Back
Top