0
Answer

how to open a folder in a designated location

Wang

Wang

18y
2k
1

I saved the windowstate of the other application, such as a folder.
 when I reopen it, I use the following code:
////////////////////////////////////////////////////////////////////
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "explorer.exe";
p.StartArgument  = "c:"
p.Start();

Application.DoEvents();

SetWindowPos(new HandleRef(null, p.MainWindowHandle), new HandleRef(null, IntPtr.Zero), 10, 10, 0, 0, 0x15);
//////////////////////////////////////////////////////////////////////

but when it run to "Application.DoEvents();", the p exited, then p cann't get MainWindowHandle.
so the method failed.

any other method?