HI all,
I am making an editor in C# with visual studio 2010. This editor draws simple shapes like rectangles to a picturebox. You can drag these rectangles around in the picturebox. This last part doesn't look to good. Since visual studio is more event based then updates per second it's not that weird. The drawing goes with a lot of stuttering and is not consistent.
I want to know if it is possible create a constant 24 updates per second to achieve a smoother drawing flow. Does anybody have a suggestion on how to solve this?
Thanks in advance.
24 updates per second
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Dipal ChoksiRank #199 · 12K reputationPosted Nov 2, 2011, 11:33 AM EDT
http://www.codeproject.com/KB/GDI-plus/flickerFreeDrawing.aspx
Another quick solution could be to disable background painting and doing all the painting in your onpaint event.
SetStyle(ControlStyles::UserPaint | ControlStyles::AllDrawingInWmPaint, true);
HTH!
Jorn Theunissen7 reputationPosted Nov 3, 2011, 12:29 AM EDT