Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
***ing Picture1.Picture to Image1.Picture
Old
  (#1)
Sandra Setz
Guest
 
Posts: n/a
Default ***ing Picture1.Picture to Image1.Picture - 06-04-2007, 09:45 AM

Hi,

Is it possible to ***ign 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
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: ***ing Picture1.Picture to Image1.Picture
Old
  (#2)
Ramon
Guest
 
Posts: n/a
Default Re: ***ing Picture1.Picture to Image1.Picture - 06-04-2007, 09:45 AM

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" <EMAIL REMOVED> wrote in message
news:EMAIL REMOVED om...
> Hi,
>
> Is it possible to ***ign 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



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: ***ing Picture1.Picture to Image1.Picture
Old
  (#3)
J French
Guest
 
Posts: n/a
Default Re: ***ing Picture1.Picture to Image1.Picture - 06-04-2007, 09:45 AM

On 12 Aug 2004 01:35:45 -0700, EMAIL REMOVED (Sandra Setz) wrote:

>Hi,
>
>Is it possible to ***ign 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
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: ***ing Picture1.Picture to Image1.Picture
Old
  (#4)
Sandra Setz
Guest
 
Posts: n/a
Default Re: ***ing Picture1.Picture to Image1.Picture - 06-04-2007, 09:45 AM

EMAIL REMOVED (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
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top