Hello,
I wanted to ask if anyone can help me complete the
following code. I found this example while searching
through help documnets. What i want to achieve is to open
a dialog box that lets the user select an images file.
I am using the openFileDialog control.
Here is what i have done so far for the onlick event for
the button...
Dim myStream As Stream
Dim openFileDialog1 As New OpenFileDialog()
openFileDialog1.InitialDirectory = "c:\"
openFileDialog1.Filter = "txt files (*.txt)|*.txt|All
files (*.*)|*.*"
openFileDialog1.FilterIndex = 2
openFileDialog1.RestoreDirectory = True
If openFileDialog1.ShowDialog() = DialogResult.OK Then
myStream = openFileDialog1.OpenFile()
If Not (myStream Is Nothing) Then
' Insert code to read the stream here.
myStream.Close()
End If
End If
Im not sure on what to write for the stream code (where
the comment is). Does anyone have any useful articles or
advise.
thx.