Results 1 to 2 of 2

Thread: How to resize images in VB6?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2016
    Posts
    87

    Question How to resize images in VB6?

    Hi!

    I'm in programming graphics in VB6 beginner.
    I want to ask few Qs in one thread so they're here:
    1. How to zoom in/out image to fill result?
    2. How to zoom in/out image to fit result?
    3. How to zoom in/out image to stretch result?
    4. How to resize image if is target larger only by adding borders - leave image untouched, only add frame?
    It can me for PictureBox or Image or if is only other way available.
    Image is bitmap.

    Thank you for each help, reply or comments.
    Miro

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

    Re: How to resize images in VB6?

    Using an image control with its Stretch property set to True will resize the image for display when you change the size of the image control.

    Other than that, there are some tricks which include using a PictureBox, AutoRedraw as True. You size the picturebox to the image's new dimensions, then render the image onto the picturebox. After that, you execute: Set Picture1.Picture = Picture1.Image. Now Picture1.Picture has the resized image.

    Of course, there are always APIs.

    You may want to show us some of your code that you are having problems with.
    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