CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    29

    Adapting the size of a jpg to a picture box



    Hi!

    How can I to adapt the size of a jpg to a picture box?

    I have a some jpg with differents sizes.

    Some images are bigger than the picture box, some are smaller, some are widther, etc.

    Can I to adapt the size or can I to use scrollbars?


    Thanks in advance!


    Federica

    [email protected]

  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Adapting the size of a jpg to a picture box



    Hi


    I'm not sure about a picture box, but if you use an Image control with vb then you can set the Stretch property to True before you load the picture.


    eg.


    Image1.Stretch = True

    Set Image1.Picture = LoadPicture("C:\MyPic.JPG")


    Regards


    Chris Eastwood


    CodeGuru - the website for developers

    http://www.codeguru.com/vb



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

Featured