procedure TForm1.FormCreate(Sender: TObject);<br>var<br> Canvasc :TCanvas;<br> i :integer;<br>begin<br><br> Canvasc :=TCanvas.Create ;<br> Canvasc.Handle :=Getdc(0);<br> Bmp :=TBitmap.Create ;<br> Bmp.Width :=1024;<br> Bmp.Height :=768;<br> Bmp.Canvas.CopyRect(Rect(0,0,1024,768),Canvasc,Rect(0,0,1024,768));<br><br> for i:=0 to 512 do<br> begin<br> Canvasc.Brush.Color :=clYellow;<br> Canvasc.Pen.Color :=clBlue;<br> Canvasc.Rectangle(512-i,0,512+i,768);<br> sleep(1);<br> end;<br> Canvasc.CopyRect(Rect(0,0,1024,768),Bmp.Canvas,Rect(0,0,1024,768));<br> Bmp.free;<br> Canvasc.Free;<br>end;<br><br>你可以执行上面一段代码,原理是一样的,你可以定时的重画一下就OK了