Selasa, 12 Maret 2013
18.49
No comments
source code lengkapnya
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters,
cxContainer, cxEdit, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinCaramel,
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinFoggy,
dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinPumpkin, dxSkinSeven,
dxSkinSharp, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
dxSkinSummer2008, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue, Menus, StdCtrls, cxButtons, cxLabel, cxMemo,
cxMaskEdit, cxTextEdit, cxCurrencyEdit, ATTerbilang;
type
Tfo_terbilang = class(TForm)
ed_harga: TcxCurrencyEdit;
kd_brg: TcxMaskEdit;
ed_nm_brg: TcxMaskEdit;
ed_qty: TcxMaskEdit;
ed_total: TcxCurrencyEdit;
ed_terbilang: TcxMemo;
cxLabel1: TcxLabel;
cxLabel2: TcxLabel;
cxLabel3: TcxLabel;
cxLabel4: TcxLabel;
cxLabel5: TcxLabel;
cxLabel6: TcxLabel;
cxButton1: TcxButton;
ATTerbilang1: TATTerbilang;
procedure cxButton1Click(Sender: TObject);
procedure ed_hargaKeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fo_terbilang: Tfo_terbilang;
implementation
{$R *.dfm}
procedure Tfo_terbilang.cxButton1Click(Sender: TObject);
begin
kd_brg.Clear;
ed_nm_brg.Clear;
ed_qty.Text := '0';
ed_harga.Text := '0';
ed_total.Text := '0';
ed_terbilang.Clear;
kd_brg.SetFocus;
end;
procedure Tfo_terbilang.ed_hargaKeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
ed_total.EditValue := ed_harga.EditValue * ed_qty.EditValue;
ATTerbilang1.Number := ed_total.EditValue;
ed_terbilang.EditValue := ATTerbilang1.Terbilang + ' Rupiah';
end;
end;
procedure Tfo_terbilang.FormShow(Sender: TObject);
begin
kd_brg.Clear;
ed_nm_brg.Clear;
ed_qty.Text := '0';
ed_harga.Text := '0';
ed_total.Text := '0';
ed_terbilang.Clear;
kd_brg.SetFocus;
end;
end.
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar