every object that has the ability to read files accept a string that's a file path (usually the FileName property of the openfiledialog) but you can specify your own
such as:
Dim srReader As New StreamReader("c:\yourfile.txt")
instead of
Dim srReader As New StreamReader(OpenFile.FileName)
what if this file I'm trying to open is not a text file. But a file of some other type, like a shapfile(.shp). Can I stil use this method to open it too?
you are of great help!
But there seems to be a problem when the program is trying to get the image file as this error occurs: An unhandled exception of type 'System.IO.FileNotFoundException' occurred in system.drawing.dll
But I'm 100% sure that I had that file placed in that directory.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.