I would just like to add a comment about doublebuffered := true; While this may solve the problem it's terrible slow. If you were to use standard Delphi GDI I would recomend drawing on one bitmap and flip it onto an other bitmap.

But I would advise you to use something like (Un)DelphiX if you're a beginner.