I read somewhere that CreateGraphics() will follow these steps for us:
- Beginpaint
- Drawing
- Endpaint
I have my code:
private void Form1_Load(object sender, EventArgs e) { grFrom = this.CreateGraphics(); grFrom.FillRectangle(Brushes.Red, this.ClientRectangle); }
There is no red rectangle ... but when I copy the line below into Form1_paint , each thing works correctly.
grFrom.FillRectangle(Brushes.Red, this.ClientRectangle);
So the question here is: What is e.Graphics in Form1_paint ?
CreateGraphics or e.Graphics ?
source share