Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Try
- Image.FromFile(Application.StartupPath & "/image.png")
- Catch ex As Exception
- MsgBox("Cannot find the image from this path:" & vbNewLine & ex.Message)
- End Try
- End Sub
- End Class
- 'The Ex.message gives you more details on the error, in this instance the path it could not find.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement