-
Resizing a picture
Am using VB5. Have different sized picture files which I want to load into
a PictureBox control. I want to resize the pictures before loading so that
they are all the same size on the screen. Have fiddled about with ScaleMode
and PaintPicture but nothing I do has any effect on the eventual size of
the picture loaded. The picture box is larger than any of the graphics in
their original size.
Any pointers would be greatly appreciated.
Trevor Ross
-
Re: Resizing a picture
> Am using VB5. Have different sized picture files which I want to load into
> a PictureBox control. I want to resize the pictures before loading so that
> they are all the same size on the screen. Have fiddled about with
ScaleMode
> and PaintPicture but nothing I do has any effect on the eventual size of
> the picture loaded. The picture box is larger than any of the graphics in
> their original size.
Have a look at the stretchBlt() API call. Also keep the scale modes at 3
(vbPixels) and make sure the AutoRedraw property is set to true.
Hope this helps,
Mike
-- EDais --
WWW: Http://Members.xoom.com/EDais/
Work E-Mail: EDais@btinternet.com
Other E-Mail: Frankle@btinternet.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks