Click here to Skip to main content
15,884,040 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i want to open a folder/my computer by clicking a command button from my project and how i can perform this??somebody plz help.....
Posted

If I have understood the question correctly (and if it's still relevant), I think this should be what you want to do:

VB
Imports System.Threading

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.MyComputer))
    End Sub

End Class
 
Share this answer
 
v3
Use the FolderBrowserDialog control.
 
Share this answer
 
Just add the following code into your button:

Process.Start("explorer.exe", "Path of your file/Folder")
 
Share this answer
 
Comments
Nelek 22-Dec-13 6:20am    
Do you realize that you come 3 and half years late?
Member 11772792 1-Aug-17 5:47am    
:D ha ha
commenting after another 3 and half years ha ha ha
knattertoon 17-Feb-21 15:34pm    
Perfect! Exactly what I needed... even after some years

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900