T
Tony Johansson
Hi!
When you have a Form with name Form1 with several controls for example
Buttons TextBox and you move another window for example NotePad infront of
this Form1 window and then move this NotePad away so Form1 window is shown
again you don't have to worry about to redraw of any of these controls on
the Form1 window because windows take care of this for you.
I just wonder when I use graphics component like Rectangle and Ellipse from
the drawing namespace like this example below
why can't windows handle the redraw of the window in the same manner that
windows handle the redraw of normal controls like Button,TextBox and so on.
Graphics g = this.CreateGraphics();
Pen bluePen = new Pen(Color.Blue,3);
g.DrawRectangle(bluePen, 0, 0, 10, 10);
Pen redPen = new Pen(Color.Red,2);
g.DrawEllipse(redPen, 0, 0, 80, 60);
//Tony
When you have a Form with name Form1 with several controls for example
Buttons TextBox and you move another window for example NotePad infront of
this Form1 window and then move this NotePad away so Form1 window is shown
again you don't have to worry about to redraw of any of these controls on
the Form1 window because windows take care of this for you.
I just wonder when I use graphics component like Rectangle and Ellipse from
the drawing namespace like this example below
why can't windows handle the redraw of the window in the same manner that
windows handle the redraw of normal controls like Button,TextBox and so on.
Graphics g = this.CreateGraphics();
Pen bluePen = new Pen(Color.Blue,3);
g.DrawRectangle(bluePen, 0, 0, 10, 10);
Pen redPen = new Pen(Color.Red,2);
g.DrawEllipse(redPen, 0, 0, 80, 60);
//Tony