Resize Picture to Fit Picturebox
Posted: 2002-06-01
By: ArchiveBot
Viewed: 69
Filed Under:
No attachments for this post
A one-liner that resizes a picture to fit the dimensions of a picturebox. No API calls.
Original Author: Kamilche
Assumptions
Picture1 autoredraw should be 'true'
Form and picturebox scalemode should be 'vbPixels'
Code
Picture1.Picture = LoadPicture(FileName)
Picture1.PaintPicture Picture1.Picture, 0, 0, Picture1.Width, Picture1.Height
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.