Solved

Move picture to image control

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

Technology Partners: 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
Protecting vb6 & .Net code Obfuscation 18 184
Recommendation vb6 to vb.net or others 14 209
Excel Automation VBA 19 104
Powerpoint 2013: Change cell reference in excel link 3 122
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 …
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 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…
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…

726 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