Tuesday, May 31, 2011

Show MyComputer, ControlPanel, RecycleBin, NetworkPlaces on Button Click

In the button click event, type the following code.
The My Computer or Windows Explorer window will pop up.
Collapse

Process MyComp = new Process();
MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{20d04fe0-3aea-1069-a2d8-08002b30309d}");
MyComp.Start();


For showing ControlPanel, just change the arguments with this one:
Collapse

MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}");


For showing RecycleBin:
Collapse

MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{645FF040-5081-101B-9F08-00AA002F954E}");


For showing NetworkPlaces:
Collapse

MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{208D2C60-3AEA-1069-A2D7-08002B30309D}");

No comments: