unit wortwechsel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, Shellapi, ExtCtrls;
type
TForm1 =
class(TForm)
GroupBox1: TGroupBox;
Edit1: TEdit;
Button1: TButton;
GroupBox2: TGroupBox;
Image1: TImage;
Button2: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure Label1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
//FormCreate angelegt
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Randomize;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
close;
end;
//Link zur Homepage
procedure TForm1.Label1Click(Sender: TObject);
begin
ShellExecute(Application.Handle, '
open',
PChar(Label1.Caption),
nil,
nil,
SW_ShowNormal);
Cursor:=crHandPoint;
Font.Color:=clBlue;
Font.Style:=[fsUnderline];
end;
procedure TForm1.Button2Click(Sender: TObject);
const txt:
array[0..5]
of string = ('
Fisch','
Eidechse','
Vogel','
Schwuppi','
Lurchi','
Hansi');
begin
Edit1.Text := txt[Random(Length(txt))];
end;
end.