June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to optimize drawing for a form that is frequently refreshed and want to reduce flicker.
Render the graphics to an in-memory bitmap, and then copy the finalized bitmap to the form.
In some applications you need to repaint a form or control frequently. This is commonly the case when performing animation. For example, you might use a timer to invalidate your form every second. Your painting code could then redraw an image at a new location, creating the illusion of motion. The problem with this approach is that every time you invalidate the form, Windows repaints the window background (clearing the form), and then runs your painting code, which draws the graphic element ...
Read now
Unlock full access