Visual Basic Express thread (22)

4 Name: nobuyuki!GfMr2LTKW. : 2006-07-05 15:13 ID:cQKeiabz

thanks @ nitro for pointing out that .ShowDialog is a function that executes the form. N00b mistake. I can't ask for the result by showing the form again like this, so here's what the new code looks like. function for loading an image:

    With OpenFileDialog1
.Filter = "JPEG (*.jpg)|*.jpg|PNG (*.png)|*.png|Bitmap (*.BMP)|*.BMP|All Files (*.*)|*.*"
DialogResult = .ShowDialog()
        If DialogResult = Windows.Forms.DialogResult.OK Then 
            If .FileName.Length <> 0 Then
Try
PictureBox1.ImageLocation = .FileName
Catch ex As Exception
                End Try
End If
End If
End With
This thread has been closed. You cannot post in this thread any longer.