
Image property stops picture resizing correctly ?
Hi,
can any VB gurus out there explain this effect I've been trying to
work around ?
I have a picture control which I load with the LoadPicture()
function. I then have another control (grid) which allows me to change
the width and height of the picture1 control. While I do this, the
graphic within the picture control resizes along with the control. Fine.
If I now create an image control, and as a result of a command
button, set the image1.picture = picture1.image, when I now resize the
picture control, the graphic within no longer follows suit.
If I create a second picture control, and do the following...
picture2.width = picture1.width
picture2.height = picture1.height
picture2 = picture1
image1.picture = picture2.image
...it seems to work OK.
Any ideas ?
The reason I'm doing this, is to put a graphic into a grid control, and
to have it resize correctly when the column width/row height changes.
Grids don't like ".wmf" graphics, but do like the "image" property of
pictures. Basically, resizing the grid allows me to resize a (hidden)
picture, but as soon as I reference the 'image' property of the image,
the resizing of the picture no longer works.
Ross