P
Pantelis Sotiropoulos
Greetings!
I'm opening a text file with as a StreamReader. The problem is when the file
is used by another user or Windows, it won't open! When I double click the
file it opens it. That's strange. Shouldn't it open it as read-only? Is
there an option to force it to open the file?
I'm using:
Dim sr As New StreamReader("C:\myfile.txt")
what if I use:
Dim s As New Stream = File.OpenRead("C:\myfile.txt")
Dim sr As New StreamReader(s)
would that work??
My final option is copying the file to a temp directory and open it from
there.
I'm opening a text file with as a StreamReader. The problem is when the file
is used by another user or Windows, it won't open! When I double click the
file it opens it. That's strange. Shouldn't it open it as read-only? Is
there an option to force it to open the file?
I'm using:
Dim sr As New StreamReader("C:\myfile.txt")
what if I use:
Dim s As New Stream = File.OpenRead("C:\myfile.txt")
Dim sr As New StreamReader(s)
would that work??
My final option is copying the file to a temp directory and open it from
there.