allo Sobat Blogger....
Aku mau sedikit Share ilmu ni tentang cara membuat kalkulator sederhana dengan Delphi 07... Hehehe
It's Okay... biar gak buang-buang waktu langsung aja,
Kalo Mau di Donlot Aplikasi dan Source.a, Klik Aja Disini!!
Gambar Tampilannya Begini >>
Source Code.a Seperti ini >>
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
edit3.Text:=IntToStr(StrToInt(edit1.Text)*StrToInt(edit2.Text));
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
If MessageDlg('Apakah Anda Ingin Keluar??',mtconfirmation,[Mbyes,MbNo],0)=MrYes then Application.Terminate;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
edit3.Text:=IntToStr(StrToInt(edit1.Text)+StrToInt(edit2.Text));
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
edit3.Text:=IntToStr(StrToInt(edit1.Text)-StrToInt(edit2.Text));
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
edit3.Text:=floatToStr(StrTofloat(edit1.Text)/StrTofloat(edit2.Text));
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Label5.Left:=Label5.Left-1;
if Label5.Left<20 then
Label5.Left:=310;
end;
0 komentar
Posting Komentar