Hello,
This is my first question in this forum :)
I'm new in GDI+ and C# programming, though I have an experience in other programming languages.
Here is my question:
I started a new Windows Form Application project in Visual Studio 2008.
Then I double-clicked the Paint event of the form and added the following line to the Form1_Paint(..) method:
private void Form1_Paint(object sender, PaintEventArgs e)
{
[B]e.Graphics.DrawEllipse(Pens.Red, 0, 0, 50, 50);[/B]
}
When I run the application I do see the circle, but I don't really understand what happened.
More specifically:
1) When does Form1_Paint(..) called ?
2) When does the Paint event of the form is raised ?
3) Why the Paint event is raised when I run the application ?
4) Why the circle is actually drawn on the form ? i.e. what is the relationship between the form class, the "PaintEventArgs e" argument, and the "e.Graphics" object ?
I will appreciate any help !
Thanks in advance !