Membuat Aplikasi Converter dengan Delphi

Sourch Codenya :
unit conv;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TFormConv = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    edRp: TEdit;
    edPil: TEdit;
    btConvert: TButton;
    btExit: TButton;
    edCon: TEdit;
    label8: TLabel;
    procedure btConvertClick(Sender: TObject);
    procedure btExitClick(Sender: TObject);

  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormConv: TFormConv;

implementation

{$R *.dfm}

procedure TFormConv.btConvertClick(Sender: TObject);
var
Rp : Integer;
Pil : Integer;
Con,Cn : Real;
begin
Rp := StrToInt(edRp.Text);
Pil := StrToInt(edPil.Text);
if Pil=1 then
begin
Cn := rp/10000;
edCon.Text := FloatToStr(Cn) +  ' USD ';
end
else if Pil=2 then
begin
Cn := rp/1250;
edCon.Text := FloatToStr(Cn) +  ' Yen ';
end
else if Pil=3 then
begin
Cn := rp/2500;
edCon.Text := FloatToStr(Cn) +  ' Bath Thailand ';
end
else
edCon.Text :='Pilihan Anda Salah, Masukkan Pilihan Di Atas';
end;
procedure TFormConv.btExitClick(Sender: TObject);
begin
Application.Terminate;
end;

end.



aplikasinya :






Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Bintoro Ali
');