Registriert seit: 23. Nov 2014
6 Beiträge
Delphi 7 Professional
|
AW: Fehlermeldung "zugewiesener Wert wird niemals benutzt"?
19. Mai 2015, 18:29
Delphi-Quellcode:
implementation
var Farbe: tColor;
Hg : tBrushStyle;
Art : tPenMode;
{$R *.dfm}
procedure TForm1.B_ZeichnenClick(Sender: TObject);
var x1, y1 , x2 , y2 :integer;
begin
with form1.image1.canvas do
begin
x1:=Random(Width);
x2:=Random(Width);
y1:=Random(Height);
y2:=Random(Height);
Canvas.Pen.Color :=Farbe;
Canvas.Brush.Color:=Farbe;
Canvas.Pen.Mode :=Art;
Canvas.Rectangle(x1,y1,x2,y2)
end;
end;
procedure TForm1.B_EndeClick(Sender: TObject);
begin
close;
end;
procedure TForm1.R_weissClick(Sender: TObject);
begin
Farbe:=clWhite;
end;
procedure TForm1.R_pinkClick(Sender: TObject);
begin
Farbe:=clfuchsia;
end;
procedure TForm1.R_schwarzClick(Sender: TObject);
begin
Farbe:=clBlack ;
end;
procedure TForm1.R_gruenClick(Sender: TObject);
begin
Farbe:=clGreen;
end;
procedure TForm1.R_PurpleClick(Sender: TObject);
begin
Farbe:=clpurple;
end;
procedure TForm1.B_LeerClick(Sender: TObject);
begin
if B_Leer.Caption='leer' then
begin
Hg:=bsSolid;
B_Leer.caption:='gefüllt';
end
else begin
Hg:=bsClear;
B_Leer.caption:='leer';
end
end;
procedure TForm1.B_NormalClick(Sender: TObject);
begin
if B_Normal.Caption='normal'then
begin
Art:=pmNotCopy;
B_Normal.caption:='komplementär';
end
else
begin
art:=pmCopy;
B_Normal.caption:='normal';
end ;
end;
procedure TForm1.B_LoeschenClick(Sender: TObject);
begin
with Form1.Image1 do
begin
picture:=nil;
end;
end;
end.
|
|
Zitat
|