Foxpro Tutorial | Belajar Foxpro Online | VFP Programming - woro.webs.com
 

Foxpro Tutorial | Belajar Foxpro Online | VFP Programming

 

Satu

1. Menu Depan

Foxpro Tutorial

Timer1_Timer()

with thisform
.lbltanggal.caption=DMY(date())
.lbljam.caption=time()
endwith

 

Dua

2. Text Box

BelajarFoxpro Online

cmdok_Click()

with thisform
.lblnama.caption=.txtnama.value
endwith

 

Tiga

3. Obyek Focus

VFP Programming

txtkesatu_KeyPress()

LPARAMETERS nKeyCode, nShiftAltCtrl
if nKeyCode=13 
thisform.txtkedua.setfocus
endif

 

txtkesatu_LostFocus()

with thisform
.txtkesatu.value="Belajar"
endwith

 

txtkedua_KeyPress()

LPARAMETERS nKeyCode, nShiftAltCtrl
if nKeyCode=13 
thisform.txtketiga.setfocus
endif

 

txtketiga_GotFocus()

with thisform
.txtketiga.value="Visual Basic"
endwith

 

Empat

4. Option Button

Form1_Activate()

with thisform
.opggender.optpria.value=0
.opghitung01.opttambah.value=0
.opghitung02.optkali.value=0
endwith

 

optpria_Click()

with thisform
if .opggender.optpria.value=1 then
.txtgender.value=.opggender.optpria.caption
endif
endwith

 

optwanita_Click()

with thisform
if .opggender.optwanita.value=1 then
.txtgender.value=.opggender.optwanita.caption
endif
endwith

 

opttambah_Click()

with thisform
if .opghitung01.opttambah.value=1 then
.txthasil.value=.txtbilsatu.value+.txtbildua.value
.opghitung01.optkurang.value=0
.opghitung02.optkali.value=0
.opghitung02.optbagi.value=0
endif
endwith

 

optkurang_Click()

with thisform
if .opghitung01.optkurang.value=1 then
.txthasil.value=.txtbilsatu.value-.txtbildua.value
.opghitung01.opttambah.value=0
.opghitung02.optkali.value=0
.opghitung02.optbagi.value=0
endif
endwith

 

optkali_Click()

with thisform
.opghitung01.optkurang.value=0
.opghitung01.opttambah.value=0
.opghitung02.optbagi.value=0
endwith

 

optbagi_Click()

with thisform
.opghitung01.optkurang.value=0
.opghitung01.opttambah.value=0
.opghitung02.optkali.value=0
endwith

 

cmdhitung_Click()

with thisform
if .opghitung02.optkali.value=1 then
.txthasil.value=.txtbilsatu.value*.txtbildua.value
else
if .opghitung02.optbagi.value=1 then
.txthasil.value=.txtbilsatu.value/.txtbildua.value
endif
endif
endwith

 

Lima

5. Check Box

Gratis Program Penjualan

chkpria_Click()

with thisform
if .chkpria.value=1 then
.txtgender.value=.chkpria.caption
.chkwanita.value=0
endif
endwith

 

chkwanita_Click()

with thisform
if .chkwanita.value=1 then
.txtgender.value=.chkwanita.caption
.chkpria.value=0
endif
endwith

 

chkpakuan_Click()

with thisform
if .chkpakuan.value=1 then
.txtharga.value=100000
.chkparahyangan.value=0
.chkbromo.value=0
endif
endwith

 

chkparahyangan_Click()

with thisform
if .chkparahyangan.value=1 then
.txtharga.value=150000
.chkpakuan.value=0
.chkbromo.value=0
endif
endwith

 

chkbromo_Click()

with thisform
if .chkbromo.value=1 then
.txtharga.value=200000
.chkparahyangan.value=0
.chkpakuan.value=0
endif
endwith

 

txtjumlah_LostFocus()

with thisform
.txttotal.value=.txtharga.value*.txtjumlah.value
endwith

 

Enam

6. Combo Box

Form1_Init()

with thisform
.cbobarang.additem ("Radio")
.cbobarang.additem ("Televisi")
.cbobarang.additem ("Kulkas")
.lstbarang.additem ("Mobil")
.lstbarang.additem ("Bus")
.lstbarang.additem ("Truk")
.cbojual.additem ("Radio")
.cbojual.additem ("Televisi")
.cbojual.additem ("Kulkas")
.lstjual.additem ("Mobil")
.lstjual.additem ("Bus")
.lstjual.additem ("Truk")
.lsttulis01.additem("Pensil")
.lsttulis01.additem("Buku")
.lsttulis01.additem("Pulpen")
endwith

 

cbobarang_Click()

with thisform
.txtbarang.value=.cbobarang.value
endwith

 

lstbarang_Click()

with thisform
.txtbarang.value=.lstbarang.value
endwith

cbojual_Click()

with thisform
if .cbojual.value="Radio" then
.txtharga.value=100000
.chk05.value=1
.chk10.value=0
.chk15.value=0
else
if .cbojual.value="Televisi" then
.txtharga.value=1500000
.chk05.value=0
.chk10.value=1
.chk15.value=0
else
if .cbojual.value="Kulkas" then
.txtharga.value=3500000
.chk05.value=0
.chk10.value=0
.chk15.value=1
endif
endif
endif
endwith

lstjual_Click()

with thisform
if .lstjual.value="Mobil" then
.txtharga.value=25000000
.chk05.value=1
.chk10.value=0
.chk15.value=0
else
if .lstjual.value="Bus" then
.txtharga.value=75000000
.chk05.value=0
.chk10.value=1
.chk15.value=0
else
if .lstjual.value="Truk" then
.txtharga.value=250000000
.chk05.value=0
.chk10.value=0
.chk15.value=1
endif
endif
endif
endwith

 

txttotal_GotFocus()

with thisform
if .chk05.value=1 then
diskon =(.txtharga.value* 5)/100
else
if .chk10.value=1 then
diskon =(.txtharga.value* 10)/100
else
if .chk15.value=1 then
diskon =(.txtharga.value* 15)/100
endif
endif
endif
.txttotal.value=.txtharga.value-diskon
endwith

 

cmdkirim_Click()

with thisform
for I = 0 to .lsttulis01.listcount+1
if .lsttulis01.selected(I)=.t. then
.lsttulis02.additem (.lsttulis01.value)
.lsttulis01.removeitem (.lsttulis01.listindex)
exit
endif
next I
endwith

 

cmdkirimsemua_Click()

with thisform
for I=0 to .lsttulis01.listcount+1
.lsttulis02.additem(.lsttulis01.list(I))
next I
.lsttulis01.clear
endwith

 

cmdkembali_Click()

with thisform
for I = 0 to .lsttulis02.listcount+1
if .lsttulis02.selected(I)=.t. then
.lsttulis01.additem (.lsttulis02.value)
.lsttulis02.removeitem (.lsttulis02.listindex)
exit
endif
next I
endwith

 

cmdkembalisemua_Click()

with thisform
for I=0 to .lsttulis02.listcount+1
.lsttulis01.additem(.lsttulis02.list(I))
next I
.lsttulis02.clear
endwith

Tujuh A

7. Page Frame

   (a). Data Nilai

Form1_aktif()

with thisform.PFNilai.PGData
.txtNim.enabled=.t.
.txtNilai.enabled=.t.
.txtGrade.enabled=.t.
.txtPredikat.enabled=.t.
endwith

 

Form1_pasif()

with thisform.PFNilai.PGData
.txtNim.enabled=.f.
.txtNilai.enabled=.f.
.txtGrade.enabled=.f.
.txtPredikat.enabled=.f.
endwith

 

Form1_kosongbox()

with thisform.PFNilai.PGData
.txtNim.value=""
.txtNilai.value=""
.txtGrade.value=""
.txtPredikat.value=""
endwith

 

Form1_Init()

with thisform
.kosongbox()
.aktif()
endwith

 

txtNim_Valid()

with thisform.PFNilai.PGData
if empty(.txtNim.value)
messagebox("Isi Dulu NIM-nya",16,"Peringatan")

return .f.
endif
endwith

 

txtNilai_Valid()

with thisform.PFNilai.PGData
if empty(.txtNilai.value)
messagebox("Isi Dulu Nilai-nya",16,"Peringatan")

return .f.
endif
endwith

 

cmdsimpan_Click()

select tabnilai
set order to tag NIM
with thisform.PFNilai.PGData
if .cmdsimpan.enabled=.t. then
thisform.pasif()
append blank
replace NIM with .txtNim.value
replace nilai with val(.txtNilai.value)
replace grade with .txtGrade.value
replace predikat with .txtPredikat.value
endif
endwith
with thisform
.aktif()
.kosongbox()
endwith

 

cmdbatal_Click()

with thisform
.kosongbox()
.aktif()
endwith

 

cmdbatal_RightClick()

select tabnilai
set dele off

 

Tujuh B

7.Page Frame

    (b). Tabel

grdTabnilai_Click()

select tabnilai
set order to tag NIM
with thisform.PFNilai.PGTabel
if !empty(.txtcari.value)
seek alltrim(.txtcari.value)
endif
endwith

 

cmdcari_Click()

select tabnilai
set order to tag NIM
with thisform.PFNilai.PGTabel
if !empty(.txtcari.value)
seek alltrim(.txtcari.value)
if !found()
messagebox("Data Tidak Ketemu")
endif
endif
.grdTabnilai.refresh
endwith

 

cmdhapus_Click

select tabnilai
set dele on
set order to tag NIM
with thisform.PFNilai.PGTabel
if .cmdhapus.enabled=.t. then
local pesan
pesan=messagebox("Yakin Akan Dihapus",36,"Konfirmasi")
if pesan=6 then
thisform.pasif()
dele
go top
endif
endif
.grdTabnilai.refresh
endwith

 

cmdhapus_RightClick()
select tabnilai
set order to tag NIM
with thisform.PFNilai.PGTabel
if .cmdhapus.enabled=.t. then
local pesan
pesan=messagebox("Yakin Akan Dihapus",36,"Konfirmasi")
if pesan=6 then
thisform.pasif()
dele
pack
endif
endif
.grdTabnilai.refresh
endwith

 

txtcari_Click()

with thisform.PFNilai.PGTabel
.txtcari.value=""
endwith

Tujuh C

7.Page Frame

    (c). Foto

cmdfoto_Click()

with thisform.PFNilai.PGFoto
local pilih
if .chklaguna.value=1 then
.imggambar.picture=""
.imggambar.picture="c:\03vfp\gambar\laguna.bmp"
else
if .chknuansa.value=1 then
.imggambar.picture=""
.imggambar.picture="c:\03vfp\gambar\nuansa.bmp"
else
if .chkfiesta.value=1 then
.imggambar.picture=""
.imggambar.picture="c:\03vfp\gambar\fiesta.bmp"
endif
endif
endif
endwith

chkfiesta_Click

with thisform.PFNilai.PGFoto
.chknuansa.value=0
.chklaguna.value=0
endwith

chklaguna_Click()

with thisform.PFNilai.PGFoto
.chknuansa.value=0
.chkfiesta.value=0
endwith

 

chknuansa_Click()

with thisform.PFNilai.PGFoto
.chklaguna.value=0
.chkfiesta.value=0
endwith

 

 

Delapan

8.Program

 

 

 

Sembilan

9.Text Box Builder

 

 

 

Sepuluh

10.Grid Builder

 

 

 

Sebelas A

11.Menu Designer

 

 

 

Sebelas B

11.Menu Generate

 

 

Menu Generate berfungsi untuk membuat file MENUUTAMA.MPR

 

Lihat gambar pembuatan program (8.Program), disitu Tertulis do C:\03vfp\MENUUTAMA.MPR

 

 

Duabelas

12.Set Main Program

 

 

Project Manager > lihat root code > sub root programs > klik kanan program http://00woro.webs.com/visualfoxpro/Latihan > klik set main

Project Manager >Klik Program http://00woro.webs.com/visualfoxpro/Latihan >Klik Build > Pilih Win32 executable

 

Back to top of page

 

Jumlah Pengunjung(Visitor):

Main Menu

Home
Preface
Curriculum Vitae
Transcript

ARTICLE

Revolution
Globalisasi budaya
Artificial Intelligence
Perpustakaan
Tips dan Trik Web SEO

VACANCY

JobsDB.com
Karir.com
Jobstreet.com
Jobindo.com

POETRY

Borderline
For You
Scar
The Partition
Poem

PROGRAMMING

Visual Basic :
Visual Foxpro :
Visual Basic :
VB+SQL2000+Crystal Report :
Visual Foxpro :
PHP : HTML Tutorial

DOWNLOAD

Apache Software :
PHP Software: PHP Editor :

No Installment

Software
My SQL WinRar 4.2.0 JavaScriptEditor 2.2.0 webceo8.0.zip Internet Utilities
Tutorial Website

NO INSTALL is mean can be operated over flashdisk,CDRW, hard-disk, external-disk or virtual-disk.


324 Jati Raya Road Depok 16418 - Indonesia
Foxpro Tutorial | Belajar Foxpro Online | VFP Programming - woro.webs.com