Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

display several images in a picturebox

Posted on 2003-10-31
4
Medium Priority
?
144 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 80 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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

661 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