ok. you have a control. you show the image using DC's. normaly you do control.picture=picture.image(for save the image on control).
but the control is more small(or big) than an image. is there any way to catch the image size from control itself?
ok. you have a control. you show the image using DC's. normaly you do control.picture=picture.image(for save the image on control).
but the control is more small(or big) than an image. is there any way to catch the image size from control itself?
You can set the picture's property AutoSize to True before loading the image, save its width and height then set AutoSize to False and restore its original width and height.
sorry, i can't. because the Usercontrol don't have that property![]()
I'm talking about a Picture not UserControl, control.picture=picture.image
but i found what i need.
grp it's my class variable and have the right size... then i did:
why plus 4? it's for the border squareCode:UserControl.Width = (GRP.Width + IFF(BorderStyle = BorderFixed, 4, 0)) * Screen.TwipsPerPixelX UserControl.Height = (GRP.Height + IFF(BorderStyle = BorderFixed, 4, 0)) * Screen.TwipsPerPixelY
and, i belive, we can use image.width(or it's picture?).
with that bolean variable(that you sugest) it's working
thanks for all
Last edited by joaquim; Oct 8th, 2012 at 08:31 AM.