Solved

display several images in a picturebox

Posted on 2003-10-31
4
133 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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bit defender blocks good applications 2 121
VBA filters 2 81
Problem to line 23 81
how to read data from all excel sheet and copy it in in Master sheet 2 28
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

752 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