C
cty0000
I have some quiestion...
I want to draw line,point,rectangles and etc... on the from
So I code like this..
public update()
{
g = this.CreateGraphics();
g.FillRectangle(Brushes.White, x1, y1, x2, y2);
}
But the rectangle is removed after window update (minimizer or overrap
by other window)
How can I keep my drawing??
Someone recommand to draw somethins in paint event but I have
question...
My question is... do I need to keep all draw information at some class
or variable to use by paint event???
For example..
If I draw 10 rectangles by using x1,x2, y1,y2, does paint event need
all 10 datas when redraw??
What I want to do is ...
1. A class send position data to B class
2. when B class receive data, B class draw on form by GDI
3. A glass update position data (goto 1)
looping like 1-2-3- 1-2-3- 1-2-3 about 1000 more times
in this case do I also need to draw something at paint event?
and does B class need to keep all data to use at redraw time??
please help me..
I want to draw line,point,rectangles and etc... on the from
So I code like this..
public update()
{
g = this.CreateGraphics();
g.FillRectangle(Brushes.White, x1, y1, x2, y2);
}
But the rectangle is removed after window update (minimizer or overrap
by other window)
How can I keep my drawing??
Someone recommand to draw somethins in paint event but I have
question...
My question is... do I need to keep all draw information at some class
or variable to use by paint event???
For example..
If I draw 10 rectangles by using x1,x2, y1,y2, does paint event need
all 10 datas when redraw??
What I want to do is ...
1. A class send position data to B class
2. when B class receive data, B class draw on form by GDI
3. A glass update position data (goto 1)
looping like 1-2-3- 1-2-3- 1-2-3 about 1000 more times
in this case do I also need to draw something at paint event?
and does B class need to keep all data to use at redraw time??
please help me..