unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ActnList, Menus, StdCtrls, ExtCtrls;

type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
CheckBox1: TCheckBox;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
MainMenu1: TMainMenu;
Biim1: TMenuItem;
Renk1: TMenuItem;
Font1: TMenuItem;
FontDialog1: TFontDialog;
FontDialog2: TFontDialog;
FontDialog3: TFontDialog;
FontDialog4: TFontDialog;
FontDialog5: TFontDialog;
Panel1: TPanel;
Label4: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
procedure Renk1Click(Sender: TObject);
procedure Font1Click(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Edit2Change(Sender: TObject);

private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

uses Unit2, Unit3;

{$R *.dfm}

procedure TForm1.Renk1Click(Sender: TObject);
begin
form2.ShowModal;
end;

procedure TForm1.Font1Click(Sender: TObject);
begin
form3.showmodal;
end;

procedure TForm1.Edit1Change(Sender: TObject);
var
x:real;
begin
if checkbox1.Checked then
begin
label8.Caption:=floattostr(strtofloatdef(edit1.Text,0)*0.4 + strtofloatdef(edit2.text,0)*0.6);
x:=strtofloat(label8.caption);
if x>=70 then
label6.caption:='GEÇTİ'
else
label6.caption:='KALDI';
end;
if checkbox1.Checked=false then
begin
label8.Caption:=floattostr(strtofloatdef(edit1.Text,0)*0.4 + strtofloatdef(edit2.text,0)*0.6);
x:=strtofloat(label8.caption);
if x>=60 then
label6.caption:='GEÇTİ'
else
label6.caption:='KALDI';
end;
end;

procedure TForm1.Edit2Change(Sender: TObject);
var
x:real;
begin
if checkbox1.Checked then
begin
label8.Caption:=floattostr(strtofloatdef(edit1.Text,0)*0.4 + strtofloatdef(edit2.text,0)*0.6);
x:=strtofloat(label8.caption);
if x>=70 then
label6.caption:='GEÇTİ'
else
label6.caption:='KALDI';
end;
if checkbox1.Checked=false then
begin
label8.Caption:=floattostr(strtofloatdef(edit1.Text,0)*0.4 + strtofloatdef(edit2.text,0)*0.6);
x:=strtofloat(label8.caption);
if x>=60 then
label6.caption:='GEÇTİ'
else
label6.caption:='KALDI';
end;
end;


end.


--------------------------------------------------------------------
Bir önceki konumuz olan «sayı bulma oyunu random(delphi)» konumuzunda ilginizi çekeceğini düşünerek incelemenizi tavsiye ederiz.