VISUAL FOXPRO
Visual FoxPro adalah bahasa pemrograman berorientasi objek dan prosedural dari Microsoft. Awalnya bahasa pemrograman ini dikenal dengan nama FoxBASE yang diluncurkan oleh Fox Software pada awal 1984. Fox Technologies kemudian bergabung dengan Microsoft pada 1992 sehingga di depan nama FoxBASE ditambahkan awalan "Visual".Versi terakhir FoxPro (9.0) dapat berjalan pada sistem operasi Mac OS, DOS, Windows, dan Unix. Visual FoxPro 3.0, versi "Visual" pertama, akhirnya tersingkir karena hanya mendukung Mac OS dan Windows, dan versi berikutnya hanya mendukung Windows saja. Versi terkini Visual FoxPro adalah berdasarkan teknologi COM dan Microsoft telah menyatakan bahwa mereka tidak berniat untuk menciptakan versi Microsoft .NET.
Nah temen temen di atas adalah sejarah singkat dari Visual Foxpro
sekarang kita akan membahas program sederhana konversi suhu menggunakan Foxpro 9.0
Langkah 1
Yang pertama pasti temen temen harus download dulu ya visual Foxpro 9.0 hehehe kalau belum install ya install dulu search di google aja hehe
Langkah 2
- Nomer 1-4 menggunakan tool Label
- Nomer 5 & 6 menggunakan tool Text
- Nomer 7 & 8 menggunakan tool Combobox
- Nomer 9 & 10 menggunakan command button
beri nama label ,text,dan command button seperti di atas cari di poperti masing masing
Nah setelah anda mendesain gambar seperti di atas kurang lebih nya sekarang menuju langkah ke 3
Langkah 3
* Pengaturan poperti pada combo box
- Klik pada combo box maka akan otomatis mengarah pada poperti combobox
- Lakukan penyetingan pada RowSource isikan C,R,F,K karena kita akan mengkonversi celcius rearmur farenhit dan kelvin
- dan satu lagi penyetingan pada RowSourcel tepat dibawah RowSource isikan Value
Langakah 4
* Source Code Commannd button Konversi
- Klik 2x pada Command button 1 yang di berinama (Konversi)
- Isikan Source Code berikut :
DO case
CASE ALLTRIM(thisform.combo1.Value)='C' AND thisform.combo2.Value='R'
thisform.text2.Value = 4/5 * (thisform.text1.value)
CASE ALLTRIM(thisform.combo1.Value)='C' AND thisform.combo2.Value='F'
thisform.text2.Value = 9/5 *(thisform.text1.Value) + 32
CASE ALLTRIM(thisform.combo1.Value)='C' AND thisform.combo2.Value='K'
thisform.text2.Value = (thisform.text1.Value) + 273
CASE ALLTRIM(thisform.combo1.Value)='R' AND thisform.combo2.Value='C'
thisform.text2.Value = 5/4 * (thisform.text1.Value)
CASE ALLTRIM(thisform.combo1.Value)='R' AND thisform.combo2.Value='F'
thisform.text2.Value = 9/4 * (thisform.text1.Value) + 32
CASE ALLTRIM(thisform.combo1.Value)='R' AND thisform.combo2.Value='K'
thisform.text2.Value = 5/4 *(thisform.text1.Value) + 273
CASE ALLTRIM(thisform.combo1.Value)='F' AND thisform.combo2.Value='C'
thisform.text2.Value = 5/9 * (thisform.text1.Value) - 32
CASE ALLTRIM(thisform.combo1.Value)='F' AND thisform.combo2.Value='R'
thisform.text2.Value = 4/9 * (thisform.text1.Value) - 32
CASE ALLTRIM(thisform.combo1.Value)='F' AND thisform.combo2.Value='K'
thisform.text2.Value = 5/9 *(thisform.text1.Value - 32) + 273
CASE ALLTRIM(thisform.combo1.Value)='K' AND thisform.combo2.Value='C'
thisform.text2.Value =(thisform.text1.Value) - 273
CASE ALLTRIM(thisform.combo1.Value)='K' AND thisform.combo2.Value='R'
thisform.text2.Value = 4/5 * (thisform.text1.Value) - 273
CASE ALLTRIM(thisform.combo1.Value)='K' AND thisform.combo2.Value='F'
thisform.text2.Value = 9/5 *(thisform.text1.Value - 273) + 32
endcase
Langkah 5
* Source Code command button hapus
- klik 2x pada command button hapus
- masukan source code berikut :
thisform.Text1.value=0
thisform.Text2.value=0
thisform.Text1.SetFocus
Sekian postingan saya kali ini , tentang program konversi suhu dengan visual FoxPro 9.0
jika kurang paham atau ada error silahkan komen di bawah
terima kasih
semoga bermanfaat
* Pengaturan poperti pada combo box
- Klik pada combo box maka akan otomatis mengarah pada poperti combobox
- Lakukan penyetingan pada RowSource isikan C,R,F,K karena kita akan mengkonversi celcius rearmur farenhit dan kelvin
- dan satu lagi penyetingan pada RowSourcel tepat dibawah RowSource isikan Value
Langakah 4
* Source Code Commannd button Konversi
- Klik 2x pada Command button 1 yang di berinama (Konversi)
- Isikan Source Code berikut :
DO case
CASE ALLTRIM(thisform.combo1.Value)='C' AND thisform.combo2.Value='R'
thisform.text2.Value = 4/5 * (thisform.text1.value)
CASE ALLTRIM(thisform.combo1.Value)='C' AND thisform.combo2.Value='F'
thisform.text2.Value = 9/5 *(thisform.text1.Value) + 32
CASE ALLTRIM(thisform.combo1.Value)='C' AND thisform.combo2.Value='K'
thisform.text2.Value = (thisform.text1.Value) + 273
CASE ALLTRIM(thisform.combo1.Value)='R' AND thisform.combo2.Value='C'
thisform.text2.Value = 5/4 * (thisform.text1.Value)
CASE ALLTRIM(thisform.combo1.Value)='R' AND thisform.combo2.Value='F'
thisform.text2.Value = 9/4 * (thisform.text1.Value) + 32
CASE ALLTRIM(thisform.combo1.Value)='R' AND thisform.combo2.Value='K'
thisform.text2.Value = 5/4 *(thisform.text1.Value) + 273
CASE ALLTRIM(thisform.combo1.Value)='F' AND thisform.combo2.Value='C'
thisform.text2.Value = 5/9 * (thisform.text1.Value) - 32
CASE ALLTRIM(thisform.combo1.Value)='F' AND thisform.combo2.Value='R'
thisform.text2.Value = 4/9 * (thisform.text1.Value) - 32
CASE ALLTRIM(thisform.combo1.Value)='F' AND thisform.combo2.Value='K'
thisform.text2.Value = 5/9 *(thisform.text1.Value - 32) + 273
CASE ALLTRIM(thisform.combo1.Value)='K' AND thisform.combo2.Value='C'
thisform.text2.Value =(thisform.text1.Value) - 273
CASE ALLTRIM(thisform.combo1.Value)='K' AND thisform.combo2.Value='R'
thisform.text2.Value = 4/5 * (thisform.text1.Value) - 273
CASE ALLTRIM(thisform.combo1.Value)='K' AND thisform.combo2.Value='F'
thisform.text2.Value = 9/5 *(thisform.text1.Value - 273) + 32
endcase
Langkah 5
* Source Code command button hapus
- klik 2x pada command button hapus
- masukan source code berikut :
thisform.Text1.value=0
thisform.Text2.value=0
thisform.Text1.SetFocus
Sekian postingan saya kali ini , tentang program konversi suhu dengan visual FoxPro 9.0
jika kurang paham atau ada error silahkan komen di bawah
terima kasih
semoga bermanfaat
Post a Comment