[RESOLVED] help with opening a folder using Visual Basic 2010 Express
how can i open a folder with Visual Basic, preferably with a Message Box?
e.g. when the user clicks "OK" on a message, a certain folder will open.
I am new to Visual Basic so can you please help me?
thanks:)
cool_asian
Re: help with opening a folder using Visual Basic 2010 Express
Hi, something like this:
VB.NET Code:
'Show a message box and test to see if the OK button was clicked
If MessageBox.Show("Do you want to open a folder?", "Caption", MessageBoxButtons.OKCancel) = DialogResult.OK Then
'Create a reference to the path you want to open
Dim Path As String = "c:\"
'And open the folder using the Explorer.exe Process
Process.Start("Explorer.exe", Path)
End If
Hope this helps :)
Re: help with opening a folder using Visual Basic 2010 Express
You could simply call
Code:
System.Diagnostics.Process.Start("C:\")
This will open the c:\ path with the default explorer application
Re: help with opening a folder using Visual Basic 2010 Express
thanks everyone, your replies have been very helpful.
i appreciate your help