Results 1 to 4 of 4

Thread: Dim arImage(10) as Image

  1. #1

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Question

    Help

    I have all these Imagesboxes that need to change picture
    to different pictures almost constantly.

    Is there a way that I can declare a variable to an
    array of images like:
    dim arImage(1 to 10) as image

    and them in form_load populate this array with my pictures like
    arImage.picture=loadpicture(app.path & "\myPicture.gif")

    And whenever I need to change picture in my imagebox I simply
    write:
    mypicbox.picture=arimage(5)

    I dont wanna use loadpicture when I change the pictures since I
    have around 60+ imageboxes that need to change pictures at the same time.

    Any Ideas?
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    I don't think you can do that.

    What you could do (and I expect you've already considered it anyway) is have a hidden array of imageboxes to hold your pictures,

    or use an imagelist

    [Edited by Mark Sreeves on 05-24-2000 at 12:19 PM]
    Mark
    -------------------

  3. #3
    Lively Member
    Join Date
    Dec 1999
    Location
    Karlsruhe, Germany
    Posts
    122
    Have you tried ImageList from Microsoft Windows Common Controls?

    RogerH


  4. #4

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Unhappy Thank you

    Hmmmmmm to bad that I cant do that.

    I already use an array of imageboxes on a form that is invisible and set my pictures according to them. But I wanted to remove that form. Now it seems like I have to stick with it anyway

    I dont wanna use an imagelist since I'm still developing my app and the requirements for the Images changes constantly, don't you hate clients that can't decide what they want!?
    The imagelist is not as flexible as I want it when it comes to changing the images.
    I might use it when the app is ready to ship.

    Maybe it will be possible in VB10

    Well well, you can't allways get what you wan't.

    Tahnk for you reply.
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

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