Solved

C# image control

Posted on 2011-03-10
3
416 Views
Last Modified: 2012-05-11
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
Comment
Question by:GRChandrashekar
  • 2
3 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35094355
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
 

Author Comment

by:GRChandrashekar
ID: 35094416
Yes picture box. SizeMode does not work is pic is bigger than control size
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 35094435
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question