Resizing a picture


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Resizing a picture

  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



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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center