- kombobox1>>procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if ComboBox1.ItemIndex=0 then
Edit2.Text:='500000'
else if ComboBox1.ItemIndex=1 then
Edit2.Text:='600000';
if ComboBox1.ItemIndex=2 then
Edit2.Text:='700000'
end; - checkbox1>>procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if checkbox1.Checked then
edit3.Text:='50000'
end; - checkbox2>>procedure TForm1.CheckBox2Click(Sender: TObject);
begin
if checkbox2.Checked then
edit4.Text:='10000'
end; - RadioButton1>>procedure TForm1.RadioButton1Click(Sender: TObject);
begin
if radiobutton1.Checked then
edit5.Text:='0';
end; - RadioButton2>>procedure TForm1.RadioButton2Click(Sender: TObject);
begin
if radiobutton2.Checked then
edit5.text:='5000'
end; - Hitung>>procedure TForm1.Button1Click(Sender: TObject);
var
a,b,c,d,e:integer;
begin
a:=strToInt(Edit2.Text);
b:=strToInt(Edit3.Text);
c:=strToInt(Edit4.Text);
d:=strToInt(Edit5.Text);
e:=a+b+c+d;
edit6.Text:=inttostr(e);
end; - Hapus>> procedure TForm1.Button2Click(Sender: TObject);
begin
edit1.Text:='';
combobox1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='';
edit5.Text:='';
edit6.Text:='';
edit1.setfocus;
end; - Keliar>> ShowMessage('apakah anda yakin mau keluar');
application.Terminate;
Senin, 12 Maret 2012
Progran_01
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar