473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DrawImage on the form.

Hi!

Jus a simple form. Using DrawImage I draw (in OnPaint) a bitmap.
protected override void OnPaint(PaintEventArgs e)
{
if (_album.Count 0)
{
// Paint the current image
Photograph photo = _album.CurrentPhoto;
Graphics g = e.Graphics;
switch (_selectedMode)
{
default:
case DisplayMode.StretchToFit:
g.DrawImage(photo.Image, this.DisplayRectangle);
break;

I'm new to C#. May be this question was several times answered, but I
could not

Nov 10 '06 #1
0 1268

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jeroen Ceuppens | last post by:
Hi, When i do this in my programma, in the contstructor of the form: g.DrawImage(i,new Rectangle(0,0,i.Width,i.Height),0,0,i.Width,i.Height,GraphicsUnit.Pixel); it doens't paint it ;( but if...
1
by: Ivan | last post by:
Hi there I'm trying to use BitBlt function instead od DrawImage beacuse I need speed in my app. I have one Bitmap (bmp) that is loaded from file and I use it in OnPaint for drawing. Currently I...
5
by: Frecklefoot | last post by:
I'm using DrawImage() to copy one image onto another, larger one. I'm using a DrawImage() overload to stretch the source image onto the destination. The problem is that when it draws the stretched...
0
by: news | last post by:
Hi guys, Am I right in thinking that the DrawImage method will only render in 8bits/pixel ? I have the following code (assume my16bitImage is a 16bit bitmap in memory) .... myMatrix = new...
0
by: Jon Slaughter | last post by:
I'm manually displaying images in a TreeView but when I stick the images in the Images(icons) container in the TreeView and use DrawImage they look like crap but when I force an icon draw and use...
0
by: Lev Elbert | last post by:
Using DrawImage I draw (in OnPaint) a bitmap on a form protected override void OnPaint(PaintEventArgs e) { if (_album.Count 0) { // Paint the current image Photograph photo =...
6
by: Lev Elbert | last post by:
Using DrawImage I draw (in OnPaint) a bitmap on a form protected override void OnPaint(PaintEventArgs e) { if (_album.Count 0) { // Paint the current image Photograph photo =...
2
by: kirkage | last post by:
I am attempting to create a program in C# which part of it consists of one image fading to another. The best way I found this to work is from an example by Bob Powell on the thread...
1
by: Marco Trapanese | last post by:
Hello! I know GDI+ are very slow, DrawImage method is one of the slowest methods (as confirmed by a code profiler ran on my application). I have not spare time to rewrite the paint routine...
8
by: Phil | last post by:
Is it possible to find the size of the MDIClient area, excluding the space already used by docked controls? I have thought I could perhaps create a new control, set it's Dock property to Fill and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.