Resize Picture to Fit Picturebox
A one-liner that resizes a picture to fit the dimensions of a picturebox. No API calls.
Assumes
Picture1 autoredraw should be 'true'
Form and picturebox scalemode should be 'vbPixels'
Rate Resize Picture to Fit Picturebox
(9(9 Vote))
Picture1.Picture = LoadPicture(FileName)
Picture1.PaintPicture Picture1.Picture, 0, 0, Picture1.Width, Picture1.Height
Resize Picture to Fit Picturebox Comments
No comments yet — be the first to post one!
Post a Comment