unit Uhr;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 =
class(TForm)
Winkel: TEdit;
Strich: TButton;
Reset: TButton;
PaintBox1: TPaintBox;
procedure PaintBox1Paint(Sender: TObject);
procedure ResetClick(Sender: TObject);
procedure StrichClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
i : integer;
implementation
{$R *.dfm}
procedure TForm1.PaintBox1Paint(Sender: TObject);
var
LCanvas: TCanvas;
begin
LCanvas := TPaintBox(Sender).Canvas;
LCanvas.Ellipse(100,100,400,400);
end;
procedure TForm1.ResetClick(Sender: TObject);
begin
paintbox1.Repaint
end;
procedure TForm1.StrichClick(Sender: TObject);
var Radi, Gradi : extended ;
Pi: extended ;
begin
canvas.MoveTo(280,280);
canvas.lineto(280,125);
Gradi := StrToFloat(Winkel.Text) ;
Radi := Pi*(Gradi/180);
end;
end.