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

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 :)

commented: +rep +3

thanks really it worked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.