0

hi every one I am evry new to vb.net I want to have brows pictures in my form and I have made a menu and a view option I got a code from the ney but it is not wroking here it is:
If DidWork <> DialogResult.Cancel Then
strFileName = openFD.FileName
PictureBox1.Image = Image.FromFile(strFileName)
openFD.Reset()
End If

where I dont know what is"DidWork"
and if u know have any other idea of how I can do it please let me know thanks in advanced

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by apchidara
1

according to this link DidWork is integer variable

Dim DidWork As Integer = openFD.ShowDialog()

so in this line

If DidWork <> DialogResult.Cancel Then

u make sure that user did not choose cancel button in OpenFileDialog

i hope thats help u :)

Votes + Comments
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.