Vb.net Openfiledialog Not Opening File

Vb.net Openfiledialog Not Opening File Average ratng: 6,4/10 1119 votes

I'm revamping a program and am having a bit of trouble. See I was using StreamReader in my last program.

Whenever you need to allow a user to open a particular file without forcing the user to type the full path and file name, you can use the OpenFileDialog class.

Opening

The user had to type the path and file into a textbox to get the program to load the information it needed. So I wanted to change that and use a OpenFileDialog method. I got the open file dialog method working but the 1st step before I go anywhere else with this program is getting the path to the file that was opened as it is needed to load images within the same folder.

Vb.net Openfiledialog Not Opening FileKeynote not opening file

Perl Not Opening File

I tryed the Path.GetDirectoryName like I used when I was using StreamReader, but it does not work where the obect is not a string but a stream already. Im sorry if this is a very basic question but I have not done any programming in VB.NET with OpenFileDialog before and I am very interested in getting this to work. Thanks to anyone who can help:).

Posted on