CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2002
    Posts
    82

    display several images in a picturebox

    Hallo,

    I need help on the way to display several images in a picturebox control.

    Thanks for helping


    James
    james

  2. #2
    Join Date
    Dec 2002
    Location
    NC
    Posts
    125
    Do you mean you want to display different pictures at different times in one picture box? What you will need is an Image list, you can add that control through projects....components. From there you can use certain events to change the picture or even a timer.
    R.L.T.W. A+, NET+, CCNA

    doin' my best

  3. #3
    Join Date
    Nov 2002
    Posts
    82
    thank for your answer, but it is not what I mean. The thinks it that I want to display several images. May be in a unique scrollbar picturebox.
    The problem is not the scrollbar picture but the way to display for example four images in a picturebox.

    Thanks again
    james

  4. #4
    Join Date
    Dec 2002
    Location
    NC
    Posts
    125
    Try the Paintpicture event.

    Code:
    Picture1.PaintPicture LoadPicture("c:\yourpic1.jpg"), 0, 0
    Picture1.PaintPicture LoadPicture("c:\yourpic2.gif"), 600, 0
    ENSURE that the autoredraw is true. The only thing with this option is it helps to know what each size of the photos will be, this way you can postion each one without overlapping them.

    good luck.
    R.L.T.W. A+, NET+, CCNA

    doin' my best

  5. #5
    Join Date
    Dec 2002
    Location
    NC
    Posts
    125
    Sorry Jamesa, here is an aliby.

    PictureBox.PaintPicture picture, x1, y1, [width1, height1, [x2, y2, _
    [width2, height2, [opcode]]]]

    so you could specify each size in your paintpicture call
    Code:
    Picture1.PaintPicture LoadPicture("c:\yourpic1.jpg"), 0, 0,400,400
    'the zeros are the vertical and horizontal positions and the 400's are the dimensions you make the picture.  remember, the numbers correspond to the scalemode, ie.. pixel, twips ect..
    R.L.T.W. A+, NET+, CCNA

    doin' my best

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

Featured