Hi, I'm debugging this app in vb6.. you select a .jpg or .bmp and loads it into an image on the form. the image is not allowed to be larger than 750x450 (11250x6750 twips).
the problem is: image.width returns a larger value than the actual .jpg/.bmp size.
How much larger? Does it always return the same size regardless of the image that you load?
If you set .AutoSize to True and check the .ScaleMode is set to 3 (Pixels) and use the .ScaleWidth and .ScaleHeight values to get the image size, it should be correct.
sounds like you got your scalemode messed up.
A twip is 1/20 of a point, a point is 1/72 of a inch so a twip is 1440 of a inch
note both the picture box and the form have a scale mode.
If your form's scale mode is Pixel then your picturebox height and width will come back in pixels but if you use picturebox.scalewidth then it will come back in the picture box's scalemode.
also not that the picture box has a border by default thus is larger than the image if you use .WIDTH and .HEIGHT
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.