[VB] resizing image in picturebox

Solved
Hello,
I display a selected image in a combo box under VB6. However, I cannot resize the displayed image if it is larger than the picture box. Does anyone know how to set the size of the image to display?
Thank you in advance
Configuration: Windows XP Internet Explorer 7.0

5 answers



  1. Picture1.PaintPicture Image1.Picture, 0, 0, Picture1.Width, Picture1.Height

    Good luck :oD
    1
    1. Thank you for your help.
      I indeed used an Image control with the stretch option. The picture box was such a hassle!! ;)

      Image1.Stretch = True
      Image1.Picture = LoadPicture(selectedfile)

      Thank you for everything!!
      1
      1. Except that in certain scenarios where the image cannot solve this problem because it does not have the expected functionalities for further processing, we still need to find a solution...

        Alright, I'll give you the solution:

        Picture1.PaintPicture Picture1.Picture, 0, 0, Picture1.Width, Picture1.Height
        1
        1. Thank you pulpul, you really saved me.
          0
          1. Hello Pulpul,

            Why not use the Image control instead?

            ;o)
            -1