Results 1 to 2 of 2

Thread: resizing a pic?

  1. #1

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    resizing a pic?

    How can I gracefully re-size a bmp to fit into a specific size picture box?
    FCC Section 97.313(a) “At all times, an amateur station must use the minimum transmitter power necessary to carry out the desired communications.”

    I'd rather run a "Killer-Watt" than a KiloWatt - QRP Rules!!!

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: resizing a pic?

    Really, you don't because there is no need. You can draw the .Picture property to the picturebox (AutoRedraw=True) after a .CLS call. Look at the 'stdPicture Render Usage' link in my signature below. If the image is not a transparent GIF, then you may wish to use VB's PaintPicture instead.

    Edited: The above is a more proper way to 'resizing' the image, but a different way is to add the image to an Image control (Stretch property as True), then place that image control inside your picturebox and resize it to the picturebox's ScaleWidth & ScaleHeight. Also, you can simply just use an image control.
    Last edited by LaVolpe; Dec 1st, 2010 at 07:29 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width