How to open a file

stefonalfaro

Member
Joined
Dec 3, 2007
Messages
16
Programming Experience
Beginner
Im wondering how do I open a file when I click a button. I just want the openfiledialog to show up. then I click on the file I want.
 
The OpenFileDialog returns the full path of the selected file from its FileName property. Exactly how you then open that file is up to you. It's just a path in a String, so you can do whatever you like with it. If you just want a FileStream you can call the OpenFile method of the OpenFileDialogue. Otherwise it's up to you.
 
Back
Top