That code didn't work.
Any other ideas?
Whether I put a pic in it or not it still reckons there isn't one in it.
Printable View
That code didn't work.
Any other ideas?
Whether I put a pic in it or not it still reckons there isn't one in it.
The first reply was just a quick shot. The correct thing would be to check to handle.
If the picturebox contains a image, the image has a handle. If the picturebox is empty the handle is zero, so you should be able to detect it like this.
I belive that should do it.Code:if me.picturebox.picture.handle = 0 then
'the pictrebox contains no image
end
Private Sub Command1_Click()
If Picture1.Picture = LoadPicture("") Then MsgBox "no picture in box"
End Sub
Answered in your other post..use a variable with the pic