Hello,
After an image has been placed in a PictureBox, I am trying to make it so that when you click on the PictureBox, the image will pop up in the Windows Picture Viewer.
How do I retrieve the path and filename of the Image currently in the PictureBox?
Thanks!
Kosta
After an image has been placed in a PictureBox, I am trying to make it so that when you click on the PictureBox, the image will pop up in the Windows Picture Viewer.
Code:
Private Sub PictureBoxPreviewImagePreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBoxPreviewImagePreview.Click
Dim filepath As String
'filepath = PictureBoxPreviewImagePreview.Image
Try
Call Shell("rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen" & filepath, AppWinStyle.Hide)
Catch ex As System.Exception 'watch for exception
MsgBox("Cannot open the specified file.", MsgBoxStyle.OKOnly, "Preview Error")
End Try
End Sub
How do I retrieve the path and filename of the Image currently in the PictureBox?
Thanks!
Kosta