Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture box cannot expand when form expand

Status
Not open for further replies.

jonathanlimcy

Programmer
Apr 2, 2008
7
TW
I have a problem with my picture box as it cannot expand according to my form.I have set anchor to left and top with dock to fill.But still it does not expand. Any solution to this? Thanks
 
i think the picture box is expanding, it's just not resizing the image.

look at the SizeMode property of the picture box.


mr s. <;)

 
misterstick, i think you are right. But can i resize the image as well? Thanks
 
Just set the SizeMode property of the picturebox to StretchImage or AutoSize - as misterstick stated.
 
drawing yourself, although a challenge, is probably a bad idea if you want to spend your time coding business rules and not fiddling with painting.

use the Zoom value of the AutoSize property and it will resize the image to fit the picturebox without stretching.


mr s. <;)

 
Thanks for all the idea. It works great if it is a picture file.But mine is a map window that is integrated from a software called mapinfo. So it does not work....=(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top