Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

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
0
dabayi
Asked:
dabayi
  • 2
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
You would have to get a device context for your picturebox control and then manually BitBlt images onto different areas of the picturebox.

This is advanced API programming and would most likely require more points to get the attention of the experts.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Actually, there is a way to do it using VB alone.  This will put the two pictures side by side in the PictureBox:

Private Sub Command1_Click()
    Dim p1 As Picture
    Dim p2 As Picture
   
    Set p1 = LoadPicture("c:\my documents\my pictures\decorative_horse.gif")
    Set p2 = LoadPicture("c:\my documents\my pictures\decorative_horse2.bmp")

    Picture1.AutoRedraw = True
    Picture1.ScaleMode = vbPixels
    Picture1.PaintPicture p1, 0, 0
    Picture1.PaintPicture p2, Picture1.ScaleX(p1.Width, vbHimetric, vbPixels), 0
End Sub

Idle_Mind
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now