listing Logika IF - ENDIF visual Foxpro


listing program aplikasi Foxpro "umur" dengan logika IF-ENDIF:

*Dengan logika IF - ENDIF
1. buat Form seperti

2. listing

=> masukkan scrib/listing ke comman "proses":

if VAL(thisform.text2.Value)=>60 then
thisform.text3.Value="Lansia"
else
endif
if VAL(thisform.text2.Value)=>21 and VAL(thisform.text2.Value)<60 then
thisform.text3.Value="Dewasa"
else
endif
if VAL(thisform.text2.Value)=>17 and VAL(thisform.text2.Value)=<20 then
thisform.text3.Value="Remaja"
else
endif
if VAL(thisform.text2.Value)=>5 and VAL(thisform.text2.Value)<17 then
thisform.text3.Value="Anak-anak"
else
endif
if VAL(thisform.text2.Value)<5 then
thisform.text3.Value="Balita"
else
endif

=> masukkan scrib/listing ke comman "Baru":

x=MESSAGEBOX("anda yakin ingin dikosongkan?",36,"ek11")
IF x= 6 then
thisform.text1.Value=""
thisform.text2.Value=""
thisform.text3.Value=""
thisform.text1.setfocus
endif

=> masukkan scrib/listing ke comman "Keluar":

x=MESSAGEBOX("anda yakin ingin keluar",36,"ek11")
IF x= 6 then
thisform.release
ENDIF

3.  Silahkan Run aplikasi dan lihat hasil..
     kurang lebih hasilnya seperti ini..


Share this post :

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Parlente - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger