Hi,
What about if you set the ProcessStartInfo.WindowStyle Property to Maximized or Normal? Otherwise you can get hold of the process window handle (Process.MainWindowHandle Property) and make use of the following method
SetActiveWindow[
^] or
SetForegroundWindow[
^]to set the active window. You will need to PINVOKE:
[DllImport("user32.dll", SetLastError=true)]
static extern IntPtr SetActiveWindow(IntPtr hWnd);
Kind regards,
[From WW: Actually, upon testing, neither of those works. For some reason, the
TreeView
returns focus to itself upon completion of the
AfterSelect
or
NodeMouseClick
method so any attempt to change the focus from the current thread is overridden by the
TreeView
]