- #1
mcknia07
- 284
- 8
Public Class Form1
Private Sub btnDisplayPic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplayPic.Click
OpenFileDialog1.Filter = "Image Files (*.jpg)|*jpg"
OpenFileDialog1.ShowDialog()
Try
txtPicFile.Text = My.Computer.FileSystem.ReadAllText(OpenFileDialog1.FileName)
Catch myfilenotfound As System.IO.FileNotFoundException
MessageBox.Show("File not found - select a different file!")
Catch ex As Exception
MessageBox.Show("Unexpected error!")
End Try
End Sub
End Class
here is my code...
Private Sub btnDisplayPic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplayPic.Click
OpenFileDialog1.Filter = "Image Files (*.jpg)|*jpg"
OpenFileDialog1.ShowDialog()
Try
txtPicFile.Text = My.Computer.FileSystem.ReadAllText(OpenFileDialog1.FileName)
Catch myfilenotfound As System.IO.FileNotFoundException
MessageBox.Show("File not found - select a different file!")
Catch ex As Exception
MessageBox.Show("Unexpected error!")
End Try
End Sub
End Class
here is my code...