Invalidate and redraw
-
Hi all, i use, to move a circle in a panel (in a form), a code line such as this: Grapichs e; for(...) { panel.Invalidate(new Rect(list[i-1].x,list[i-1].y,list[i-1].widht,list[i-1].height)); e.DrawEllipse(list[i].x,list[i].y,list[i].widht,list[i].height); } can you help me with a solution that resolve a flicker problem? Is possible to create a doublebuffer in a panel object? Thanks.
Alex
-
Hi all, i use, to move a circle in a panel (in a form), a code line such as this: Grapichs e; for(...) { panel.Invalidate(new Rect(list[i-1].x,list[i-1].y,list[i-1].widht,list[i-1].height)); e.DrawEllipse(list[i].x,list[i].y,list[i].widht,list[i].height); } can you help me with a solution that resolve a flicker problem? Is possible to create a doublebuffer in a panel object? Thanks.
Alex
-
AlexB47 wrote:
Is possible to create a doublebuffer in a panel object?
Yes. Create a class that inherits from
Panel
and in the constructor you can setthis.DoubleBuffered
totrue
. :badger: -
Hi all, i use, to move a circle in a panel (in a form), a code line such as this: Grapichs e; for(...) { panel.Invalidate(new Rect(list[i-1].x,list[i-1].y,list[i-1].widht,list[i-1].height)); e.DrawEllipse(list[i].x,list[i].y,list[i].widht,list[i].height); } can you help me with a solution that resolve a flicker problem? Is possible to create a doublebuffer in a panel object? Thanks.
Alex
Hi, this[^] has all you need. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Merry Christmas and a Happy New Year to all.
-
Can you help me with example? I use a panel object with "drag and drop" from toolbar into form (I'm novice programmer in C#). Thanks a lot!
Alex
-
Hi, this[^] has all you need. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Merry Christmas and a Happy New Year to all.
-
you're welcome. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Merry Christmas and a Happy New Year to all.