Click here to Skip to main content
15,899,935 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Any body knows about this issue?

Description:

I am adding picture box runtime to windows form and loading image to it.
Windows form adding all picture box ctrls to form.But while displaying form its showing form with 32718 height.My each image height is 680.My actual height of form after adding ctrls is 37198.

This issue is only with win 7?

Does anybody knows about this?


Thanks in Advance..
Posted
Updated 25-Jul-11 21:09pm
v2

1 solution

You can use following code in C# to fix the issue:

pictureBox1.Image = image;
pictureBox1.Height = image.Height;
pictureBox1.Width = image.Width;

Or u can set custom height to picture box as u want.

Thanks & Regards
Yogesh
 
Share this answer
 
Comments
Ganesha Harke 26-Jul-11 3:15am    
I have done the same.
Its working in XP but giving problem in win 7
Ganesha Harke 26-Jul-11 3:18am    
Also made auto scroll for form true.Its scrolling for only 37198.And showing that much cntls.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900