HighTechTalks DotNet Forums  

Displaying Pictures in a pictureBox

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Displaying Pictures in a pictureBox in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Phil
 
Posts: n/a

Default Displaying Pictures in a pictureBox - 05-14-2004 , 09:01 AM






When I open a file such as a JPG to display in a pictureBox the image is very large and one only sees a small part of the picture.

How can I get the picture to fit in the pictureBox so that bthe whole picture is shown

Thanks
Phil

Reply With Quote
  #2  
Old   
Peter van der Goes
 
Posts: n/a

Default Re: Displaying Pictures in a pictureBox - 05-14-2004 , 06:06 PM







"Phil" <psfelice (AT) aol (DOT) com> wrote

Quote:
When I open a file such as a JPG to display in a pictureBox the image is
very large and one only sees a small part of the picture.

How can I get the picture to fit in the pictureBox so that bthe whole
picture is shown?

Thanks,
Phil
Check the PictureBox SizeMode property. I believe the setting you want is
StretchImage, which resizes the image to display fully in the PictureBox as
you size it. The default setting is Normal, which simply displays whatever
part of the image fits in your PictureBox. OTOH, the Autosize setting
resizes the PictureBox to accommodate the selected image.

Hope this helps.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.




Reply With Quote
  #3  
Old   
Phil
 
Posts: n/a

Default Re: Displaying Pictures in a pictureBox - 05-14-2004 , 08:01 PM



Thanks Peter, that did it! I appreciate your help...

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.