Kamis, 16 Februari 2012

FUNGSI LOGIKA MENGGUNAKAN OPERATOR - FOXPRO

LATIHAN – LATIHAN

DESAIN – LATIHAN : FUNGSI LOGIKA MENGGUNAKAN OPERATOR
-KODEBUKU
-JUDUL
-HARGA
-JUMLAH
-TOTALBAYAR
SOAL.
Jika kodebuku VB – Judulbuku : Visual Basic – Harga : 350000
Jika kodebuku FP – Judulbuku : Visual Foxpro – Harga : 20000
SCRIPT
-text4 -Interactive Changed
with thisform
if .text1.value="VB"
.text2.value="Visual Basic"
.text3.value=35000
.text4.setfocus()
else
if .text1.value="FP"
.text2.value="Foxpro"
.text3.value=20000
.text4.setfocus()
endif
endif
endwith
Author's By : Indro Dwi S, A.Md

DO CASE - VISUAL FOXPRO

SCRIPT - DO CASE

-cmdproses -click
DO Case
CASE VAL(Thisform.txtnilai.Value)>=81
thisform.txtgrade.Value="Dengan Pujian - Nilai : A"
CASE VAL(Thisform.txtnilai.Value)>=71
thisform.txtgrade.Value="Sangat Memuaskan - Nilai : B"
CASE VAL(Thisform.txtnilai.Value)>=61
thisform.txtgrade.Value="Memuaskan - Nilai : C"
CASE VAL(Thisform.txtnilai.Value)>=51
thisform.txtgrade.Value="Kurang Memuaskan - Nilai : D"
OTHERWISE
thisform.txtgrade.Value="Buruk Sekali - Nilai : E"
ENDCASE


-cmdbersih -click
THISFORM.TXtnpm.Value=""
THISFORM.TXTNILAI.Value=""
THISFORM.TXtGRADE.Value=""
THISFORM.TXTNPM.SetFocus


-cmdkeluar -click
pesan=MESSAGEBOX("Yakin anda mau keluar dari program ini...?",4+64,"Latihan Foxpro")
IF pesan=6
thisform.release()
ENDIF

Author's By : Indro Dwi Saputro, A.Md

 
Design by Puskom Corporation Software | Bloggerized by Author's By : Indro Dwi Saputro - Copyright 2012