Results 1 to 8 of 8

Thread: pictures

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2007
    Posts
    259

    Question pictures

    what variable types will hold pictures?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: pictures

    It depends on what you are doing, and how you are doing it - but the most likely one is StdPicture

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2007
    Posts
    259

    Re: pictures

    now an error comes up saying variable not set

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2007
    Posts
    259

    Re: pictures

    I am just holding the picture value of a picturebox.

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: pictures

    Quote Originally Posted by Kaimonington
    now an error comes up saying variable not set
    Are we supposed to somehow know what code is causing that error?

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2007
    Posts
    259

    Re: pictures

    I just say
    Code:
    variable = picture1.picture

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: pictures

    As it is not a simple data type (Integer/String/...), you need to Set it, eg:
    Code:
    Set variable = picture1.picture
    And when you have finished with it, you should close it if appropriate (not for StdPicture), and then set it to nothing, eg:
    Code:
    Set variable = Nothing

  8. #8
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: pictures

    You could also load it from the resource editor
    cmdButton.Picture = LoadResPicture(113, vbResBitmap)

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