One way to stop components flashing on form resize

The application I'm writing has a tiled-bitmap background across the entire
form. Every time I resized the form, I got an annoying, but bearable,
flashing. This was due to the form painting it's background, then calling my
code to paint whatever on top.

The situation became ridiculous when I installed Microsoft Plus!
This allows the contents of the window to be shown while you're resizing it.
Every time you resize the window even a fraction you get the annoying
flashing.

I found one solution to this problem:

In the form's OnCreate handler, put the code

procedure Form1Create......
begin
  Brush.Style := bsClear;
end;

Notice that this is the Form's brush - not the form's Canvas's brush.

It seems to get rid of most of the flickering.

-Kevin Newman
mailto:s9510...@babel.ee.up.ac.za