
Originally Posted by
Kaimonington
oh thanks, that worked, why couldnt I just resize it myself though?
You could, but you were not aware of the scalemode used in the .Width/.Height properties of a picture object. It is something called vbHimetrics. You need to convert that to your picbox' container's scalemode.
Code:
With Picturebox
.Move .Left, .Top, _
ScaleX(.Picture.Width, vbHimetric, .Container.ScaleMode), _
ScaleY(.Picture.Height, vbHimetric, .Container.ScaleMode)
End With
Resizing a picbox to image size does not take into consideration the size of the picbox borders. So, to properly resize it manually, you also most add border width & height to you calculations too.
Typo: vbHimetrics is not plural - should be vbHimetric & changed above.