473,473 Members | 1,488 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1272

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: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.