471,066 Members | 1,190 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Assing Picture1.Picture to Image1.Picture

Hi,

Is it possible to assign the Picture property of a picturebox to the
Picture property of an image control?

I use an invisble picturebox to make some changes to a picture, but I
want to show the picture in an imagecontrol, since the image is very
large and I want to stretch it.

But when I execute the following code:

Image1.Picture = Picture1.Picture
Image1.Refresh

The image control Image1 stays empty. What am I doing wrong?

Thanks in advance,
Sandra
Jul 17 '05 #1
3 10275
Hello Sandra,

What you can do, it using an imagelist (project -> components -> microsoft
windows common controls 5.0 / or 6.0).
Open the imagelist's property dialog (right mouse click on the control ->
properties) and add the image to the list.
Fill some name in the key box (e.g. "MyPic").

Then bind the imagecontrol and the picturebox to the imagelist:

Image1.Picture = ImageList1.ListImages.Item("MyPic").Picture
Picture1.Picture = ImageList1.ListImages.Item("MyPic").Picture

and voila !

Good luck,
Ramon.
"Sandra Setz" <ss***@wxs.nl> wrote in message
news:74**************************@posting.google.c om...
Hi,

Is it possible to assign the Picture property of a picturebox to the
Picture property of an image control?

I use an invisble picturebox to make some changes to a picture, but I
want to show the picture in an imagecontrol, since the image is very
large and I want to stretch it.

But when I execute the following code:

Image1.Picture = Picture1.Picture
Image1.Refresh

The image control Image1 stays empty. What am I doing wrong?

Thanks in advance,
Sandra

Jul 17 '05 #2
On 12 Aug 2004 01:35:45 -0700, ss***@wxs.nl (Sandra Setz) wrote:
Hi,

Is it possible to assign the Picture property of a picturebox to the
Picture property of an image control?

I use an invisble picturebox to make some changes to a picture, but I
want to show the picture in an imagecontrol, since the image is very
large and I want to stretch it.

But when I execute the following code:

Image1.Picture = Picture1.Picture
Image1.Refresh

The image control Image1 stays empty. What am I doing wrong?


1) Autoredraw
2) Set X = Picture1.Image

The Picture of a Picturebox stays the same when you tinker with
Picture1.Image
Jul 17 '05 #3
er*****@nowhere.com (J French) wrote :
1) Autoredraw
2) Set X = Picture1.Image

The Picture of a Picturebox stays the same when you tinker with
Picture1.Image


Yes, this did the trick for me. Thanks!!!

Sandra
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.