Hi Ralax, Thanks for your code. What I need is the main window handle of the open explorer window after I start the process, not the process id or process handle.
Any others has any solution? Bert On Jun 7, 2:20 pm, Ralax <[email protected]> wrote: > Try the following code: > > namespace ProcessHandle > { > class Program > { > static void Main(string[] args) > { > Console.WriteLine("Get the process handle example."); > var process = new Process > { > StartInfo = new ProcessStartInfo > ("explorer.exe", @"c:\") > }; > process.Start(); > Console.WriteLine("Process Id: " + process.Id); > Console.WriteLine("Process Name: " + process.ProcessName); > Console.WriteLine("Process Handle(IntPtr): " + > process.Handle.ToString()); > Console.ReadLine(); > } > } > > }
