Tuesday, March 29, 2011


Mohon teman2 kasih ide untuk memperbaiki program ini..
Program ini masih ada salahnya.
Silahkan di coba..

Ini Listnya

unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    GroupBox2: TGroupBox;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    RadioButton3: TRadioButton;
    RadioButton4: TRadioButton;
    RadioButton5: TRadioButton;
    RadioButton6: TRadioButton;
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    Edit6: TEdit;
    Edit7: TEdit;
    Edit8: TEdit;
    GroupBox3: TGroupBox;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    CheckBox3: TCheckBox;
    CheckBox4: TCheckBox;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure RadioButton1Click(Sender: TObject);
    procedure RadioButton2Click(Sender: TObject);
    procedure RadioButton3Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure CheckBox2Click(Sender: TObject);
    procedure CheckBox3Click(Sender: TObject);
    procedure CheckBox4Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure bersih;
    procedure trumah;
    procedure Ftam;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.trumah;
begin
  if RadioButton1.Checked=True then begin
   edit1.Text:='130000000';
   edit2.Text:='14';
  end;
  if RadioButton2.Checked=True then begin
    edit1.Text:='90000000';
    edit2.Text:='12';
  end;
  if RadioButton3.Checked=True then begin
    edit1.Text:='56000000';
    edit2.Text:='10';
  end;
end;

procedure TForm1.Ftam;
begin
  if CheckBox1.Checked=True then begin
    Edit1.Text:=IntTostr(StrToInt(Edit1.Text)+600000);
    EXIT;
  end
  else if CheckBox1.Checked=False then begin
    Edit1.Text:=IntTostr(StrToInt(Edit1.Text)-600000);
    EXIT;
  end;

  if CheckBox2.Checked=True then begin
    Edit1.Text:=IntTostr(StrToInt(Edit1.Text)+3500000);
    EXIT;
  end
  else if CheckBox2.Checked=False then begin
    Edit1.Text:=IntTostr(StrToInt(Edit1.Text)-3500000);
    EXIT;
  end;

  if CheckBox3.Checked=True then begin
    Edit1.Text:=IntTostr(StrToInt(Edit1.Text)+2000000);
    EXIT;
  end
  else if CheckBox3.Checked=False then begin
    Edit1.Text:=IntTostr(StrToInt(Edit1.Text)-2000000);
    EXIT;
  end;

end;

procedure TForm1.bersih;
begin
  Edit1.Clear;
  Edit1.Text:='0';
  Edit2.Clear;
  Edit2.Text:='0';
  Edit3.Clear;
  Edit3.Text:='0';
  Edit4.Clear;
  Edit5.Clear;
  Edit6.Clear;
  Edit7.Clear;
  Edit8.Clear;
  RadioButton1.Checked:=False;
  RadioButton2.Checked:=False;
  RadioButton3.Checked:=False;
  RadioButton4.Checked:=False;
  RadioButton5.Checked:=False;
  RadioButton6.Checked:=False;
  CheckBox1.Checked:=False;
  CheckBox2.Checked:=False;
  CheckBox3.Checked:=False;
  CheckBox4.Checked:=False;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
bersih;
end;

procedure TForm1.Button2Click(Sender: TObject);
var Hutang,Harga,Fasilitas,
    UangMuka,SukuBunga,HutangBunga:Currency;
    //SukuBunga,HutangBunga:Real;
begin
  Harga:=StrToInt(Edit1.Text);
  Fasilitas:=StrToInt(Edit3.Text);
  UangMuka:=StrToCurr(Edit4.Text);
  Hutang:=Harga + Fasilitas - UangMuka;
  Edit5.Text:=CurrToStr(Hutang);
  SukuBunga:=StrToCurr(Edit2.Text)/100;

  if RadioButton4.Checked=True then begin
    HutangBunga:=Hutang * SukuBunga * 15;
  end
  else if RadioButton4.Checked=True then begin
    HutangBunga:=Hutang * SukuBunga * 10;
  end
  else if RadioButton4.Checked=True then begin
    HutangBunga:=Hutang * SukuBunga * 5;
  end;

  Edit6.Text:=CurrToStr(HutangBunga);


end;

procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.Checked=True then begin
    Edit3.Text:=IntTostr(StrToInt(Edit3.Text)+600000);
    EXIT;
  end
  else if CheckBox1.Checked=False then begin
    Edit3.Text:=IntTostr(StrToInt(Edit3.Text)-600000);
    EXIT;
  end;
end;

procedure TForm1.CheckBox2Click(Sender: TObject);
begin
if CheckBox2.Checked=True then begin
    Edit3.Text:=IntTostr(StrToInt(Edit3.Text)+3500000);
    EXIT;
  end
  else if CheckBox2.Checked=False then begin
    Edit3.Text:=IntTostr(StrToInt(Edit3.Text)-3500000);
    EXIT;
  end;
end;

procedure TForm1.CheckBox3Click(Sender: TObject);
begin
if CheckBox3.Checked=True then begin
    Edit3.Text:=IntTostr(StrToInt(Edit3.Text)+2000000);
    EXIT;
  end
  else if CheckBox3.Checked=False then begin
    Edit3.Text:=IntTostr(StrToInt(Edit3.Text)-2000000);
    EXIT;
  end;
end;

procedure TForm1.CheckBox4Click(Sender: TObject);
begin
if CheckBox4.Checked=True then begin
    Edit3.Text:=IntTostr(StrToInt(Edit3.Text)+4500000);
    EXIT;
  end
  else if CheckBox4.Checked=False then begin
    Edit3.Text:='0';
    EXIT;
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
bersih;
end;

procedure TForm1.RadioButton1Click(Sender: TObject);
begin
trumah;
end;

procedure TForm1.RadioButton2Click(Sender: TObject);
begin
trumah;
end;

procedure TForm1.RadioButton3Click(Sender: TObject);
begin
trumah;
end;

end.


>>> jangan lupa sebelum di comment di follow dulu ya <<<

{ 1 komentar... read them below or add one }

  1. ...
    private
    procedure bersih;
    procedure rumah;
    procedure fass;
    procedure hitung;
    { Private declarations }
    public
    { Public declarations }
    end;

    var
    Form1: TForm1;

    implementation

    {$R *.dfm}
    procedure TForm1.hitung;
    var
    angsur, totalh, hutang, harga, fass, um, hutangbunga, sukubunga, jangkakredit : Currency;
    begin
    if RadioButton4.Checked=True then jangkakredit:=15;
    if RadioButton5.Checked=True then jangkakredit:=10;
    if RadioButton6.Checked=True then jangkakredit:=5;

    harga :=StrToCurr(Edit1.Text);
    fass :=StrToCurr(Edit3.Text);
    um :=StrToCurr(Edit4.Text);
    sukubunga := StrToCurr(Edit2.Text)/100;

    hutang := harga + fass - um;
    hutangbunga := hutang * sukubunga * jangkakredit;
    totalh := hutang + hutangbunga;
    angsur := totalh / (jangkakredit * 12);
    Edit5.Text := CurrToStr(hutang);
    Edit6.Text := CurrToStr(hutangbunga);
    Edit7.Text := CurrToStr(totalh);
    Edit8.Text := CurrToStr(angsur);

    end;

    procedure TForm1.fass;
    var tr,pg,ks,gg,all:Currency;
    begin
    if CheckBox1.Checked=True then tr:=600000 else tr:=0;
    if CheckBox2.Checked=True then pg:=3500000 else pg:=0;
    if CheckBox3.Checked=True then ks:=2000000 else ks:=0;
    if CheckBox4.Checked=True then gg:=4500000 else gg:=0;
    all:=tr+pg+ks+gg;
    Edit3.Text:=CurrToStr(all);
    end;

    procedure TForm1.rumah;
    var harga,disk:Currency;
    begin
    if RadioButton1.Checked=True then
    begin
    harga:=130000000;
    disk:=14;
    end
    else if RadioButton2.Checked=True then
    begin
    harga:=90000000;
    disk:=12;
    end
    else if RadioButton3.Checked=True then
    begin
    harga:=56000000;
    disk:=10;
    end;
    Edit1.Text := CurrToStr(harga);
    Edit2.Text := CurrToStr(disk);
    end;
    procedure TForm1.bersih;
    begin
    Edit1.Clear;
    Edit2.Clear;
    Edit3.Clear;
    Edit4.Clear;
    Edit5.Clear;
    Edit6.Clear;
    Edit7.Clear;
    Edit8.Clear;
    RadioButton1.Checked:=False;
    RadioButton2.Checked:=False;
    RadioButton3.Checked:=False;
    RadioButton4.Checked:=False;
    RadioButton5.Checked:=False;
    RadioButton6.Checked:=False;
    CheckBox1.Checked:=False;
    CheckBox2.Checked:=False;
    CheckBox3.Checked:=False;
    CheckBox4.Checked:=False;
    end;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
    hitung;
    end;

    procedure TForm1.Button2Click(Sender: TObject);
    begin
    bersih;
    end;

    procedure TForm1.Button3Click(Sender: TObject);
    begin
    Form1.Close;
    end;

    procedure TForm1.CheckBox1Click(Sender: TObject);
    begin
    fass;
    end;

    procedure TForm1.CheckBox2Click(Sender: TObject);
    begin
    fass;
    end;

    procedure TForm1.CheckBox3Click(Sender: TObject);
    begin
    fass;
    end;

    procedure TForm1.CheckBox4Click(Sender: TObject);
    begin
    fass;
    end;

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    bersih;
    Form1.Position:=poScreenCenter;
    Edit1.Enabled:=False;
    Edit2.Enabled:=False;
    Edit3.Enabled:=False;
    Edit4.Enabled:=True;
    Edit5.Enabled:=False;
    Edit6.Enabled:=False;
    Edit7.Enabled:=False;
    Edit8.Enabled:=False;
    end;

    procedure TForm1.RadioButton1Click(Sender: TObject);
    begin
    rumah;
    end;

    procedure TForm1.RadioButton2Click(Sender: TObject);
    begin
    rumah;
    end;

    procedure TForm1.RadioButton3Click(Sender: TObject);
    begin
    rumah;
    end;

    end.

    ReplyDelete

Budayakan Berkomentar ya Agan-Agan ^_^

Welcome to My Blog

PAPAN PENGUMUMAN

Segala file yang dibagikan pada blog ini berformat 7z disarankan mengextrak filenya menggunakan aplikasi 7-zip agar tidak terjadinya file korrup.

Server Kutucugum, Partagora dan Copiapop Sudah Dihapus. Server 1 Sudah Suspend Sedang membeckup data yang masih ada ke gdrive unlimiteed.

Link Openload.co diblokir TELKOM solusi gunakan domain https://oload.info/

Grup Delphi Via Telegram
Untuk Kalian yang ingin Belajar Delphi dan Khususnya tinggal di Pekanbaru silahkan Gabung Ke Grup Telegram Delphi Pekanbaru. Adminnya Semua Admin Blog ini Link TKP : https://t.me/delphipekanbaru

Last Update

Butuh Jasa Pembuatan Program Aplikasi Tugas Akhir, Skripsi Atau Resmi?

Popular Post

- Copyright © Delphi Anime Lover | Riko Software -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -