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