Wy22’s Weblog

Just another WordPress.com weblog

Program Menghitung Lewat Mobil(Delphi)

unit Unit1;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Buttons, ExtCtrls, XPMan;

type

TForm1 = class(TForm)

BitBtn1: TBitBtn;

Panel1: TPanel;

Label1: TLabel;

BitBtn2: TBitBtn;

procedure BitBtn1Click(Sender: TObject);

procedure BitBtn2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.BitBtn1Click(Sender: TObject);

var

nilai:integer;

pencet:boolean;

begin

pencet:=true;

nilai:=StrToInt(Panel1.Caption);

while pencet=true do

begin

nilai:=nilai+1;

Panel1.Caption:=IntToStr(nilai);

pencet:=false;

end;

end;

procedure TForm1.BitBtn2Click(Sender: TObject);

begin

Application.Terminate;

end;

end.

 

Advertisements

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: