User drawn custom control flickers when moved

User drawn custom control flickers when moved

Post by ThunderMus » Wed, 16 Aug 2006 04:26:58


Hi,
I'm developing a custom winforms control that uses the Graphics objects to
draw itself to the default UserControl panel. The problem is, even if I draw
some very basic things (like 2 rectangles), it flickers when I move it... I
mean, I can see some tearing in the control's image (or whatever is
painted). I tried using this.SuspendLayout() and this.ResumeLayout, but
nothing changed, there's still tearing...

Does anyone have any solution to this problem?

ThunderMusic
 
 
 

User drawn custom control flickers when moved

Post by ThunderMus » Wed, 16 Aug 2006 04:34:58

ok, I just solved my problem by setting the usercontrol's DoubleBuffered
property to True... Is there another solution?