Solved

display several images in a picturebox

Posted on 2003-10-31
4
138 Views
Last Modified: 2013-12-25
Hallo,

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

Thanks for helping


James
0
Comment
Question by:dabayi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 9737704
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
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 20 total points
ID: 9950535
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month4 days, 1 hour left to enroll

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question