?
Solved

Move picture to image control

Posted on 2007-03-23
2
Medium Priority
?
165 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
[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 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 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

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!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 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