procedure TForm1.Kreslit(var Msg: TWMPaint); var ps : TPaintStruct; begin BeginPaint(Handle, ps); Ctverec; EndPaint(Handle, ps); end;