1. Buat seperti gambar di bawah ini:
2. Tulis script dibawah ini :
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
a,b,c:double;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
ShowMessage('AYO BELAJAR MENGHITUNG');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
a:=strtofloat(Edit1.Text);
b:=strtofloat(Edit2.Text);
c:=a+b;
Edit3.Text :=floattostr(c);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
a:=strtofloat(Edit1.Text);
b:=strtofloat(Edit2.Text);
c:=a-b;
Edit3.Text :=floattostr(c);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
a:=strtofloat(Edit1.Text);
b:=strtofloat(Edit2.Text);
c:=a*b;
Edit3.Text :=floattostr(c);
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
a:=strtofloat(Edit1.Text);
b:=strtofloat(Edit2.Text);
c:=a/b;
Edit3.Text :=floattostr(c);
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
Edit1.SetFocus;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
ShowMessage(' "Anda Yakin Akan Keluar" ');
ShowMessage('Terima Kasih ! "Belajar menghitung yang rajin yaaaa!" ');
Application.Terminate;
//close;
end;
end.
3. SELESAI.
Silahkan mencoba..............!
by : KHAFIDZUN FADLI
Delphi 7 is a very popular pre-.net Delphi version. It was announced in August 6, 2002.
- Delphi 7 Architect
- Delphi 7 Enterprise
- Delphi 7 Professional
- Delphi 7 Personal
- (There used to be a free download from borland.pl which could be activated at CodeGear. Both links are defunct.)
Downloads/UpdatesEdit
- Delphi Downloads
- Delphi 7.1 update
- March 2007 Windows Vista Application Compatibility Update
- activate Delphi 7 personal
See alsoEdit
- Dr.Bob's Delphi 7 Clinic
- What's New in Delphi 7 (pdf)
- Enhancements Since Delphi 7
- From Delphi 7 to Delphi 2007 - Comprehensive components list
Delphi Versions | |
---|---|
Win16 | Delphi 1 |
Win32 | Delphi 2 • Delphi 3 • Delphi 4 • Delphi 5 • Delphi 6 • Delphi 7 • Delphi 2007 for Win32 |
.NET | Delphi 8 |
Win32 + .NET: | Borland Developer Studio 2005 • Borland Developer Studio 2006 • CodeGear RAD Studio 2007 • CodeGear RAD Studio 2009 |
Other: | Kylix • Delphi for PHP • 3rdRail • Turbo Delphi 2006 |
More info: | Release Dates and Codenames • Compiler Release Dates • Compiler Conditional Defines |