在Form.OnPaint中调用下面的函数更新就可以了(或者你的定时器或线程中,在线程中要注意同步问题)。
procedure TForm1.UpdateFormCanvas;
begin
with TBitmap.Create do
try
Width:=Self.Width; Height:=Self.Height;
with Canvas do // bitmap's DC
begin
// do your paint
end;
Windows.BitBlt(
Self.Canvas.Handle, // form's HDC
0,0,100,100,
Canvas.Handle, // bitmap's HDC
0,0, // target's top-left corner
SRCCOPY);
finally
Free; // bitmap resource
end;
end;