Solved

C# image control

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now