I have an Image edit control in my form and I am trying to display different
images, which is in the “tiff” file format into this control. All images
are in different height & width. How do I adjust the Height & Width of the
Image Edit Control in order to display the images with different size?
I have the code like this:
But the size of the control is not changing exactly as the size of the image
Please help me.
03-06-2003, 04:50 PM
Re: Image Edit Control
It's been a while since I worked with this one...
My recollection was that all the images in the list
could be any size, but would all display at the same
size if you are binding them to another Windows Common
Heres the text from microsoft... (Second controls refers
to the 'client' of the imagelist control...)
You can insert any size image into the ImageList control. However, the size of the image displayed by the second control
depends on one factor: whether or not the second control is also a Windows Common control bound to the ImageList
When the ImageList control is bound to another Windows Common Control, images of different sizes can be added to the
control, however the size of the image displayed in the associated Windows Common Control will be constrained to the
size of the first image added to the ImageList. For example, if you add an image that is 16 by 16 pixels to an ImageList
control, then bind the ImageList to a TreeView control (to be displayed with Node objects), all images stored in the
ImageList control will be displayed at 16 by 16 pixels, even if they are much larger or smaller.
On the other hand, if you display images using the Picture object, any image stored in the ImageList control will be
displayed at its original size, no matter how small or large.
So, basically, don't bind the imagelist to any control and set
the pictures in the client control yourself.
"Sinni" <email@example.com> wrote in message news:firstname.lastname@example.org...
> I have an Image edit control in my form and I am trying to display different
> images, which is in the “tiff” file format into this control. All images
> are in different height & width. How do I adjust the Height & Width of the
> Image Edit Control in order to display the images with different size?
> I have the code like this:
> ImgEdit1.Height = ImgEdit1.ImageHeight
> ImgEdit1.Width = ImgEdit1.ImageWidth
> ImgEdit1.Zoom = 50
> But the size of the control is not changing exactly as the size of the image
> Please help me.