
05-10-2007, 07:26 AM
|
|
Newcomer
|
|
Join Date: Apr 2007
Posts: 16
|
|
invalid picture when image not selected in file list box
|
When I click through the directory and file list boxes and find an image, it displays in an imagebox I have setup.
But if I click anything other than an image it comes up the error 'Invalid picture' how can I put in a message box saying 'not an image' instead of this VB error?
My code is: -
Code:
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub File1_Click()
Image1.Picture = LoadPicture(File1.Path & "\" & File1.FileName)
End Sub
|
|