|
-
Sep 8th, 2011, 12:49 AM
#1
Thread Starter
New Member
[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
-
Sep 8th, 2011, 05:41 AM
#2
Hyperactive Member
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
-
Sep 8th, 2011, 06:21 AM
#3
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
Please mark you thread resolved using the Thread Tools as shown
-
Sep 8th, 2011, 07:51 PM
#4
Thread Starter
New Member
Re: help with opening a folder using Visual Basic 2010 Express
thanks everyone, your replies have been very helpful.
i appreciate your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|