Results 1 to 4 of 4

Thread: How can you get VB to tell u if a pic is in a PicBox?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    Northern Irelans
    Posts
    17

    No that didn't work!!

    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.

  2. #2
    AIS_DK
    Guest
    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.

    Code:
    if me.picturebox.picture.handle = 0 then
        'the pictrebox contains no image
    end
    I belive that should do it.

  3. #3
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252
    Private Sub Command1_Click()
    If Picture1.Picture = LoadPicture("") Then MsgBox "no picture in box"
    End Sub

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Answered in your other post..use a variable with the pic
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width