DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Trevor Ross Guest

    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

  2. #2
    Mike D Sutton Guest

    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



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links