image1.Picture.LoadFromFile('D:\FILM\Pemograman
Delphi\Belanja Disini\00.jpg'); - See more at:
http://krucaci.blogspot.com/2014/04/aplikasi-sederhana-toko-buku-delphi.html#sthash.Hegt9qSE.dpuf
Selamat Siang Semuanya, sekarang saya akan memberikan contoh aplikasi sederhana dari Borlan Delphi.
semoga ini bisa bermanfaat buat para blogger semua nya :D
Contoh Hasil Aplikasi
Pertama Buka Borland Delphi kalian,
Setelah Borland terbuka, dan Buatlah form kalian seperti ini
Capek Design Fromnya? Ah Masa?,
Masuk kelangkah yang lebih serius, yaitu masukkan coding nya
dan selamat Berjuang Hahahaha :D
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls,jpeg,imglist;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
GroupBox1: TGroupBox;
ComboBox1: TComboBox;
ListBox1: TListBox;
GroupBox2: TGroupBox;
Image1: TImage;
Edit1: TEdit;
Label4: TLabel;
Edit2: TEdit;
GroupBox3: TGroupBox;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Image2: TImage;
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure ComboBox1KeyPress(Sender: TObject; var Key: Char);
procedure ListBox1Click(Sender: TObject);
procedure Listbox1KeyPress(Sender: TObject; var Key: Char);
procedure Edit2KeyPress(Sender: TObject; var Key: Char);
procedure DiskonKeyPress(Sender: TObject; var Key: Char);
procedure PembayaranKeyyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormActivate(Sender: TObject);
begin
ComboBox1.SetFocus;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ComboBox1.Items.Clear;
combobox1.Items.Add('PEMOGRAMAN DELPHI');
combobox1.Items.add('PEMOGRAMAN VISUAL BASIC');
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
edit1.Text:='0';
edit2.text:='0';
edit3.text:='0';
edit4.Text:='0';
edit5.Text:='0';
edit6.text:='0';
if combobox1.ItemIndex =0 then
begin
ListBox1.Items.clear;
listbox1.Items.Add('TIPs & TRIK UNTUK DELPHI');
listbox1.Items.Add('TIPs & TRIK UNIK DELPHI LANJUTAN');
listbox1.items.Add('KUMPULAN LATIHAN DELPHI');
end
else if combobox1.ItemIndex =1 then
begin
listbox1.Items.clear;
listbox1.Items.add('TIPs & TRIK UNIK VISUAL BASIC');
listbox1.Items.add('ANIMASI FORM VISUAL BASIC');
end;
end;
procedure TForm1.ComboBox1KeyPress(Sender: TObject; var Key: Char);
begin
if (key=#13) then
listbox1.SetFocus;
end;
procedure TForm1.ListBox1Click(Sender: TObject);
begin
if(ComboBox1.ItemIndex =0)and (listbox1.ItemIndex =0) then
begin
image1.Picture.LoadFromFile('D:\FILM\Pemograman Delphi\Belanja Disini\00.jpg');
edit1.Text :='14900';
end
else if(Combobox1.ItemIndex =0) and (listbox1.ItemIndex =1) then
begin
image1.Picture.LoadFromFile('D:\FILM\Pemograman Delphi\Belanja Disini\01.jpg');
edit1.text :='17000';
end
else if(Combobox1.ItemIndex =0) and (listbox1.ItemIndex =2) then
begin
image1.Picture.LoadFromFile('D:\FILM\Pemograman Delphi\Belanja Disini\02.jpg');
edit1.text :='17500';
end
else if(Combobox1.ItemIndex =1) and (listbox1.ItemIndex =0) then
begin
image1.Picture.LoadFromFile('D:\FILM\Pemograman Delphi\Belanja Disini\10.jpg');
edit1.text :='17000';
end
else if(Combobox1.ItemIndex =1) and (listbox1.ItemIndex =1) then
begin
image1.Picture.LoadFromFile('D:\FILM\Pemograman Delphi\Belanja Disini\11.jpg');
edit1.text :='17500';
end
end;
procedure TForm1.Listbox1KeyPress(Sender: TObject; var Key: Char);
begin
if (key=#13) then edit2.setfocus;
end;
procedure TForm1.Edit2KeyPress(Sender: TObject; var Key: Char);
var
total :real;
begin
if (key=#13) and (edit2.text='') then
begin
showmessage('Jumlah Barang Kosong, Wajib di Isi');
edit2.SetFocus;
end
else if(key=#13) and (edit3.text='') then
begin
showmessage ('Diskon Barang Kosong, Disi Sesuai Ketentuan');
edit3.SetFocus;
end
else if(key=#13) then
begin
total:=strtofloat(edit2.text)*strtofloat(edit1.text)-strtofloat(edit3.text);
edit5.Text:=floattostr(total);
edit3.SetFocus;
end;
end;
procedure TForm1.DiskonKeyPress(Sender: TObject; var Key: Char);
var
total :real;
begin
if (key=#13) and (edit2.text='') then
begin
showmessage('Jumlah Barang Kosong, Wajib di Isi');
edit2.SetFocus;
end
else if(key=#13) and (edit3.text='') then
begin
showmessage ('Diskon Barang Kosong, Disi Sesuai Ketentuan');
edit3.SetFocus;
end
else if(key=#13) then
begin
total:=strtofloat(edit2.text)*strtofloat(edit1.text)-strtofloat(edit3.text);
edit5.Text:=floattostr(total);
edit4.SetFocus;
end;
end;
procedure TForm1.PembayaranKeyyPress(Sender: TObject; var Key: Char);
var
kembali :real;
begin
if (key=#13) then
begin
kembali:=strtofloat(edit4.text)-strtofloat(edit5.text);
edit6.text:=floattostr(kembali);
edit4.SetFocus;
showmessage('TERIMA KASIH UDAH MENGHABISKAN UANG ANDA DISINI');
edit1.Text:='0';
edit2.text:='0';
edit3.text:='0';
edit4.Text:='0';
edit5.Text:='0';
edit6.text:='0';
combobox1.Text:='-Pilih Kategori-';
listbox1.items.Clear;
image1.Picture:=nil;
combobox1.SetFocus;
end;
end;
end.
*Note : Untuk Lokasi Gambarnya, Sesuaikan dimana kamu meletakkan gambarnya
image1.Picture.LoadFromFile('D:\FILM\Pemograman Delphi\Belanja Disini\01.jpg');
Gimana? Capek? Gak Jalan Programnya? dan Bertanya - tanya kok gak jalan?
ini Saya beri link download programnya, bagi yang mau instan.LEBIH BAIK INSTAN YA SOB :P
Klick Dan Download Disni, Klo mau instan
tp ingat setelah download programnya, lokasi gambarnya di benerin di listing codingnya
image1.Picture.LoadFromFile('D:\FILM\Pemograman Delphi\Belanja Disini\01.jpg');
image1.Picture.LoadFromFile('D:\FILM\Pemograman
Delphi\Belanja Disini\00.jpg'); - See more at:
http://krucaci.blogspot.com/2014/04/aplikasi-sederhana-toko-buku-delphi.html#sthash.Hegt9qSE.dpuf
image1.Picture.LoadFromFile('D:\FILM\Pemograman
Delphi\Belanja Disini\00.jpg'); - See more at:
http://krucaci.blogspot.com/2014/04/aplikasi-sederhana-toko-buku-delphi.html#sthash.Hegt9qSE.dpuf
image1.Picture.LoadFromFile('D:\FILM\Pemograman
Delphi\Belanja Disini\00.jpg'); - See more at:
http://krucaci.blogspot.com/2014/04/aplikasi-sederhana-toko-buku-delphi.html#sthash.Hegt9qSE.dpuf
REFRENSI
Mudah Belajar membuat DELPHI 2010
Jaja Jamaludin Malik

Tidak ada komentar:
Posting Komentar
Diharapkan agar tidak
- Junk
- Sara
- Mencaci Maki
Diblog ini ya, teman - teman para bloger :D