Solved

Move picture to image control

Posted on 2007-03-23
2
164 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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

688 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