By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Stretching Images

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
> 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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.