L
linuxfedora
i have added a Panel with size = (100, 100). Then i would like to draw
a Line on that Panel. So i write:
I write some codes on the OnPaint event of the Panel:
private void panel_Paint(...)
{
Graphics g = e.Graphics;
g.DrawLine(new Pen(Colors.Red, 6), new Point(0, 0), new Point(100,
100));
}
Then it can draw a line on the Panel, but when part of the Panel is
covered by other windows, the hope Panel will call OnPaint, and the
whole line will be redraw, is there any way to prevent it??Thanks
a Line on that Panel. So i write:
I write some codes on the OnPaint event of the Panel:
private void panel_Paint(...)
{
Graphics g = e.Graphics;
g.DrawLine(new Pen(Colors.Red, 6), new Point(0, 0), new Point(100,
100));
}
Then it can draw a line on the Panel, but when part of the Panel is
covered by other windows, the hope Panel will call OnPaint, and the
whole line will be redraw, is there any way to prevent it??Thanks