Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C#

Show MyComputer, ControlPanel, RecycleBin, NetworkPlaces on Button Click

3.83/5 (12 votes)
24 May 2011CPOL 31.4K  
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}");

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)