PDA

Click to See Complete Forum and Search --> : picture puzzle


Mc Brain
Apr 13th, 2000, 09:43 PM
I don't know if I understood your question, but I guess what you need is the IMAGE control, which has the property "stretch". If you set it to TRUE, it would stretch your picture to fit in your IMAGE control (no matter if it's bigger or smaller). However, it could lose the proportion of the image. I mean... if you have a rectangular image, and strecth it to a square IMAGE control, the proportion of the image would be changed. Got it?

FireBeast
Apr 13th, 2000, 10:39 PM
yeap,

image control will resize the image, but does not have the hdc property which I needed for the BitBlt function.

thanks anyway.

FireBeast

Mc Brain
Apr 13th, 2000, 11:13 PM
Then you should try the method PaintPicture:

object.PaintPicture picture, x1, y1, width1, height1, x2, y2, width2, height2, opcode


As you can see, you have two sets of Height and Width, this is for the source and the target picture. The Source picture should be loaded in a picturebox (invisible, usually) and its name should be place where it says picture (in the command I type). However, the image is actually drawn, and it would disappear if you minimize the form and re-maximize it. I mean, its not loaded, is painted! Perhaps you find any way to "fix" the image in the picture box.