[VB] resizing image in picturebox

Solved
pulpul Posted messages 63 Status Member -  
 omega081 -
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. Polux31 Posted messages 7219 Status Member 1 204
     


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

    Good luck :oD
    1
  2. pulpul Posted messages 63 Status Member 7
     
    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
  3. StrasGus
     
    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
  4. omega081
     
    Thank you pulpul, you really saved me.
    0
  5. Polux31 Posted messages 7219 Status Member 1 204
     
    Hello Pulpul,

    Why not use the Image control instead?

    ;o)
    -1