• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

C# image control

Hi
I am using image control in winforms C#.

I have varying size of images which exceed the control size i have set. Both horizontally as well as vertically.

Can any of you help me with code which can resize the image in runtime to fit the image control
0
GRChandrashekar
Asked:
GRChandrashekar
  • 2
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
If you mean a PictureBox control then you can set the SizeMode property to Zoom which will then size the image to match the control.
0
 
GRChandrashekarAuthor Commented:
Yes picture box. SizeMode does not work is pic is bigger than control size
0
 
Carl TawnSystems and Integration DeveloperCommented:
That shouldn't matter. Setting the SizeMode property to Stretch (rather than Zoom in my last post) will scale the image down to match the size of the PictureBox.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now