Search Tools Links Login

Resize Picture to Fit Picturebox


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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 95 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.