473,396 Members | 1,998 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,396 software developers and data experts.

Stretching Images

I read in MSDN an examples for Image Stretching but something I can not
understand is this line
e.Graphics.DrawImage(newImage, destRect1, x, y, width, height, units);
what is e in all example they did not show what is e ????? any help
Nov 17 '05 #1
3 2902
That e is PaintEventArgs instance.

It is used in methods for event handlers

this.Paint += new PaintEventHandler(this.form1_paint);

private void form1_paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
}

or when overriden from Control
protected override void OnPaint(PaintEventArgs e)
{
//...
}

Paint event handler is generated automatically for you when you double click
on your form in form designer.

"Raed Sawalha" <Ra*********@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
I read in MSDN an examples for Image Stretching but something I can not
understand is this line
e.Graphics.DrawImage(newImage, destRect1, x, y, width, height, units);
what is e in all example they did not show what is e ????? any help

Nov 17 '05 #2
> Paint event handler is generated automatically for you when you double
click
on your form in form designer.


correction: Load event handler is generated by double clicking form, not
paint handler, double click the row in property grid's event table to handle
paint event (as for every other event)
Nov 17 '05 #3
See the GDI+ FAQ and the Beginners Guide to GDI+ for details.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Raed Sawalha" <Ra*********@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
I read in MSDN an examples for Image Stretching but something I can not
understand is this line
e.Graphics.DrawImage(newImage, destRect1, x, y, width, height, units);
what is e in all example they did not show what is e ????? any help

Nov 17 '05 #4

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

Similar topics

0
by: tzellman | last post by:
Before I ask for help, let me give you my situation, including what I HAVE been able to do. I am trying to show an image (large, say the whole screen), and allow for instantaneous visual results...
10
by: Michael | last post by:
How can I identify the Table that the Geocities banner is in? I tried document.all.tags("table").style.display = 'none' no matter what number I used nothing worked. Using CSS script ...
22
by: Kim Scarborough | last post by:
Say I wanted to put a couple lines of asterisks between paragraphs, and have it stretch the spaces so that it spanned 100% of the text-width, like this: * * * * * ...
3
by: Sridhar | last post by:
Hi, I have created a user control which has the html code as follows <TABLE id="ToolBarTable" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td align="right"...
4
by: Arthur Dent | last post by:
Hello all... i have a really frsutrating problem here... This is only happening in IE (6 & 7b2), Mozilla and Netscape are both OK. I have a top-level table with a width of 760px, so it should be...
2
by: elephant | last post by:
I'm trying something in CSS, and I was wondering if anyone knows of a way to do it. The goal is to have one image with a width of 25px, and have the left 12 pixels be one side of an image of...
4
by: camphor | last post by:
hi, I have a single column webpage with a rounded corner box which is positioned on the left in which the links sit, the main content is on the right, I am trying to make the page stretch with the...
3
by: guaranine | last post by:
Hi, I've got the 100% height for the whole table working. What is really confusing me is how to make the TR tag in which the content is work properly in IE. If I do not explicitly specify its...
5
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I m stretching my form and i want if i stretch its position after stretching must be in middle of screen or i want to stretch centerly. Thanx >> ALI <<
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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...
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.