In some situations, itβs faster and more convenient not to draw using the paint event, but getting the Graphics object from the control / form and drawing βonβ. This can lead to some trouble with opacity / anti-aliasing / text, etc., but it can be worth the trouble in terms of having to repaint the entire shabang. Something like:
private void AnimationTimer_Tick(object sender, EventArgs args) {
I use this in some controls myself and buffered images βclearβ the background when the object of interest moves or needs to be deleted.
Peteter Aug 14 '08 at 17:39 2008-08-14 17:39
source share