Jumat, 14 Oktober 2011

posting borland delpi

 
 
unit TUGAS
unit tugas


interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
Button2: TButton;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Button3: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
procedure Button1Click(Sender: TObject);
procedure Edit2Enter(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure CheckBox3Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Edit5Click(Sender: TObject);
procedure Edit4Click(Sender: TObject);
// procedure Edit1Click(Sender: TObject);
procedure Edit2Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
gapok, pajak : Double;
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
CLOSE;
end;

procedure TForm1.Edit2Enter(Sender: TObject);
begin
showmessage ('MASUKAN NAMA ANDA DISINI');
end;

procedure TForm1.RadioButton2Click(Sender: TObject);
begin
showmessage ('YAKIN ANDA WANITA??');
end;

procedure TForm1.CheckBox3Click(Sender: TObject);
begin
showmessage ('DASAR PEMALAS!!!');
end;

procedure TForm1.Button3Click(Sender: TObject);

begin
//if (edit3.text='') then
//edit3.Text:='0' ;
// ELSE showmessage ('MASUKAN NILAI GAJI');

gapok := StrToFloat(edit4.Text);
//pajak:= (10/100)*strtofloat(edit4.Text);
//sisa := strtofloat(edit5.text);
//edit5.text:= floattostr(pajak);

edit6.Text := FloatToStr(strtofloat(edit4.text)-strtofloat(edit5.text));
end;

procedure TForm1.Edit5Click(Sender: TObject);
begin
pajak:= (10/100)*strtofloat(edit4.Text);
edit5.text:= floattostr(pajak);
end;

procedure TForm1.Edit4Click(Sender: TObject);
begin
edit4.Text:='';
end;

procedure TForm1.Edit2Click(Sender: TObject);
begin
showmessage ('MASUKAN NAMA ANDA DISINI');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
//showmessage (floattostr(pajak));
showmessage ('NIP : '+ edit1.text+chr(10)+'Nama : '+ edit2.Text+chr(10)
+ 'ALAMAT : ' + EDIT3.TEXT);
end;

end.

Tidak ada komentar:

Poskan Komentar

bila ada yang kurang silahkan berkomentar