Solved

C# image control

Posted on 2011-03-10
3
415 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
System.Speech 2 26
how can i get the executable application's path in a specific form? ('\\' instead of '\ ') 5 39
2 questions 10 25
Problem!!! 8 33
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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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