jika anda ingin file programnya download disini
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Menus;
type
TForm1 = class(TForm)
Timer1: TTimer;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Edit1: TEdit;
Edit2: TEdit;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Edit3: TEdit;
ComboBox1: TComboBox;
Button1: TButton;
Edit4: TEdit;
Label6: TLabel;
Edit5: TEdit;
Button2: TButton;
Label7: TLabel;
MainMenu1: TMainMenu;
About1: TMenuItem;
procedure ComboBox1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure About1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if ComboBox1.Text='Honda Absolute Revo CW' then
begin
Edit1.Text:='12875000';
Edit2.Text:='300000';
end;
if ComboBox1.Text='Honda BeAT CW' then
begin
Edit1.Text:='12650000';
Edit2.Text:='250000';
end;
if ComboBox1.Text='Honda CBR 150R' then
begin
Edit1.Text:='33300000';
Edit2.Text:='400000';
end;
if ComboBox1.Text='Honda New Blade Racing Edition' then
begin
Edit1.Text:='14300000';
Edit2.Text:='500000';
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if RadioButton1.Checked=true then
Edit3.Text:='Helm Cakil Dari Honda'
else if RadioButton2.Checked=true then
Edit3.Text:='Anda Tidak Dapat Hadiah';
Edit4.Text:=FloatToStr(StrToInt(Edit1.Text)-StrToInt(Edit2.Text));
end;
procedure TForm1.RadioButton1Click(Sender: TObject);
begin
if RadioButton1.Checked=true then
Button1.Show;
Button2.Show;
end;
procedure TForm1.RadioButton2Click(Sender: TObject);
begin
if RadioButton2.Checked=true then
Button1.Show;
Button2.Show;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Button2.Hide;
Button1.Hide;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Edit5.Text:=DateToStr(Date);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
RadioButton1.Checked:=false;
RadioButton2.Checked:=false;
Button1.Hide;
Button2.Hide;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ShowMessage('apa anda yakin ingin keluar dari dini');
end;
procedure TForm1.About1Click(Sender: TObject);
begin
ShowMessage('program ini di buat oleh keluarga besar sendnetwork.blogspot.com');
end;
end.