|
-
Jun 12th, 2003, 10:20 PM
#1
Thread Starter
New Member
select and open files in vb.net
Hi all,
need your help.
in vb.net, how am i going to browse a file and open/execute the selected file (no matter what the file format is, either it was a EXE, doc or picture file.)
thank you very much.
-
Jun 13th, 2003, 03:26 AM
#2
Frenzied Member
VB Code:
Dim p As New Process(), s As String
Try
s = "C:\myfile.pdf"
p.Start(s)
Catch ex As System.Exception
MessageBox.Show(ex.Message)
End Try
In the above code 'S' is the path to your file, you can assign this path various ways, one may be showing a fileopendialog and let the user choose the file.
Last edited by Lunatic3; Jun 13th, 2003 at 03:40 AM.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Jun 13th, 2003, 03:37 AM
#3
Thread Starter
New Member
haha got it, thank you very much guy
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
|