OpenFileDialog Shows Twice?
Posted: Sat Jul 17, 2010 10:33 pm
Hello,
I am using the following code from what I assume is correct.
I am using the following code from what I assume is correct.
Code: Select all
I have this problem: After you select a file and click open, it shows the dialog again. Then, you select it again and click open, and it works. Can somebody tell me why this happens? And how to fix it? OpenFileDialog1.ShowDialog()
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim Reader As New System.IO.StreamReader(OpenFileDialog1.FileName)
TextBox1.Text = Reader.ReadToEnd
End If