I have a few ideas, but am not totally sure if it will help solve your
problem...
First suggestion: By calling the Panel's Invalidate method, you can
specificy the region that needs to be repainted via the use of the
Rectangle Struct. This should only redraw part of the Panel rather
than the entire thing.
Another option is to set the style used on the Form. When I've had to
do quick animations in .NET without using DirectX, I've managed to
solve a lot of my problems with this approach (it can get rid of
annoying flickering that can happen when your drawing requires a lot of
repainting/refreshing).
Here's a link to what MSDN has to say about it:
http://msdn.microsoft.com/library/de...classtopic.asp
Here's the bit of code that I found to be the most useful when dealing
with any sort of animation:
public class Form1: System.Windows.Forms.Form
{
public Form1()
{
SetStyle( ControlStyles.UserPaint, true );
SetStyle( ControlStyles.AllPaintingInWmPaint, true );
SetStyle( ControlStyles.DoubleBuffer, true );
}
}
These SetStyle calls (all three of these together) will turn on double
buffering for your form and should make things run a bit faster.
Hope this helps...
-- Dan