Solved

Move picture to image control

Posted on 2007-03-23
2
159 Views
Last Modified: 2010-04-30
I am in VB 6.0 ... I have drawn a graphic in a picture box and now want to copy that graphic to an image control so that it will resize the graphic to fit in the control.  I tried setting the .picture property of the image control equal to that of the picture box control, but that gives me nothing.  How can I do this?  Thanks.
0
Comment
Question by:janderscu
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 125 total points
ID: 18782750
Copy from Picture1.Image instead.

For example:

Private Sub Command1_Click()
    Picture1.AutoRedraw = True
    Picture1.ScaleMode = vbPixels
    Picture1.Line (25, 25)-(50, 50), vbRed
   
    Image1.Picture = Picture1.Image
End Sub
0
 

Author Comment

by:janderscu
ID: 18782795
That did it!  Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending a email via excel using vba 6 72
Access query that references subform 5 43
How to make an ADE file by code? 11 80
IF ELSE Statement in Excel Macro VBA 16 34
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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now