Solved

C# image control

Posted on 2011-03-10
3
417 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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