65.9K
CodeProject is changing. Read more.
Home

Show MyComputer, ControlPanel, RecycleBin, NetworkPlaces on Button Click

starIconstarIconstarIcon
emptyStarIcon
starIcon
emptyStarIcon

3.83/5 (11 votes)

May 17, 2011

CPOL
viewsIcon

31495

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.
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:
MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}");
For showing RecycleBin:
MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{645FF040-5081-101B-9F08-00AA002F954E}");
For showing NetworkPlaces:
MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{208D2C60-3AEA-1069-A2D7-08002B30309D}");