Hello everyone!
I am creating a C# application for tablet pcs and I want to animate some strokes. I am moving the strokes and, after each move, I want to reflect that move in the screen. However, if I use the refresh(), I get a lot of flickering (since the whole screen is redrawn). I only need to redraw, at each step, a certain rectangle of the panel. Thus, I am using panel.Invalidat e(rect); and panel.Update(). From what I know about this methods, I am adding the rectangle to the areas that should be redrawn in the next paint call, and then I force the redraw with the update method.
However, nothing happens. The screen remains exactly the same.
I want to avoid the flickering so I can't use the refresh. I can't use double-buffering since I want to show each modification and not only a final result. So can anyone point out what am I doing wrong with the invalidate+upda te or suggest another way of doing this?
Many thanks in advance!
I am creating a C# application for tablet pcs and I want to animate some strokes. I am moving the strokes and, after each move, I want to reflect that move in the screen. However, if I use the refresh(), I get a lot of flickering (since the whole screen is redrawn). I only need to redraw, at each step, a certain rectangle of the panel. Thus, I am using panel.Invalidat e(rect); and panel.Update(). From what I know about this methods, I am adding the rectangle to the areas that should be redrawn in the next paint call, and then I force the redraw with the update method.
However, nothing happens. The screen remains exactly the same.
I want to avoid the flickering so I can't use the refresh. I can't use double-buffering since I want to show each modification and not only a final result. So can anyone point out what am I doing wrong with the invalidate+upda te or suggest another way of doing this?
Many thanks in advance!
Comment