Stretching Images

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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)
 
Back
Top