Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 5 → Rev 6

/programy/delphi/radar/Unit1.~pas
0,0 → 1,53
unit Unit1;
 
interface
 
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ToolWin, ComCtrls;
 
type
TForm1 = class(TForm)
PaintBox1: TPaintBox;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
 
private
{ Private declarations }
public
{ Public declarations }
end;
 
var
Form1: TForm1;
 
implementation
 
{$R *.dfm}
 
procedure TForm1.Button1Click(Sender: TObject);
begin
with PaintBox1 do begin
Canvas.Brush.Color := clRed;
Canvas.Brush.Style := bsDiagCross;
Canvas.Ellipse(0, 0, PaintBox1.Width, PaintBox1.Height);
end;
end;
 
procedure TForm1.Button2Click(Sender: TObject);
var Y: Integer;
 
begin
 
{ first call FillRect to paint the surface of the form.
this removes any previously drawn lines (and anything else!) }
PaintBox1.Canvas.FillRect(ClientRect);
PaintBox1.Canvas.MoveTo(0, 0);
PaintBox1.Canvas.LineTo(PaintBox1.Width,PaintBox1.Height);
 
 
end;
 
end.