unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls, ExtCtrls;
type
TForm1 =
class(TForm)
RadioGroup1: TRadioGroup;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
RadioButton5: TRadioButton;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var langweilig: integer;
i,f,t: integer;
x,y: integer;
begin
langweilig := 0;
i := 0;
f := 0;
t := 0;
if radiobutton1.Checked = true
then langweilig := 1;
if radiobutton2.Checked = true
then langweilig := 2;
if radiobutton3.Checked = true
then langweilig := 3;
if radiobutton4.Checked = true
then langweilig := 4;
if radiobutton5.Checked = true
then langweilig := 5;
if langweilig = 0
then begin
showmessage('
Sie müssen auswählen wie langweilig ihnen ist !!');
end;
case langweilig
of
1: i := 10;
2: i := 25;
3: i := 50;
4: i := 100;
5: i := 250;
end;
for f := 1
to i
do
begin
t := i-f+1;
randomize;
x := random((1000)+1);
y := random((1000)+1);
showmessagepos('
So jetzt is dir nicht mehr langweilig du hast noch ' +inttostr(t)+ '
mal zu klicken',x,y);
end;
if MessageDlg ('
Ist ihnen immernoch langweilig ??', mtConfirmation,[mbYes, mbNo], 0) = mrNo
then begin
Messagedlg('
Ok aber glauben sie mir ihnen wird wieder langweilig werden!', mtInformation,[mbOK],0);
close;
end;
end;
end.