Syaloom Sobat...
Masih dengan yang kemaren juga berbicara tentang Microsoft Visual Basic 6.0,
kali ini gak berbicara tentang menu makanan, tapi cara membuat aplikasi penerbangan sederhana..
wow... bisa donk nantinya kita buat ticket pesawat...
heheheeee... :D gampang tuh...!
Perhatikan step by step ya sobat...
1. Buat 2 label “judul” & “Total bayar”2. Buat 1 frame “tujuan”
3. Buat 2 option button “jakarta” & “batam”
4. Buat 2 check box “snack” & “bagasi”
5. Buat 1 combo box untuk “jenis penerbangan”
6. Buat 1 text box untuk “hasil total bayar”
Langsung saja klik “view code” dibagian pojok atas kanan.
(bukan close ya..) untuk membuat rumus..:
(bukan close ya..) untuk membuat rumus..:
Silahkan copy+pastekan rumus brikut :
Private Sub CMDOK_Click()
If OPTJK.Value = True And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 700000
End If
If OPTJK.Value = True And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 500000
End If
If OPTBT.Value = True And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 600000
End If
If OPTBT.Value = True And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 400000
End If
If OPTJK.Value = True And CHKBG.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 900000
End If
If OPTBT.Value = True And CHKBG.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 800000
End If
If OPTJK.Value = True And CHKSN.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 800000
End If
If OPTBT.Value = True And CHKSN.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 700000
End If
If OPTJK.Value = True And CHKBG.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 800000
End If
If OPTBT.Value = True And CHKBG.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 600000
End If
If OPTJK.Value = True And CHKSN.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 700000
End If
If OPTBT.Value = True And CHKSN.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 500000
End If
If OPTJK.Value = True And CHKBG.Value = 1 And CHKSN.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 1000000
End If
If OPTBT.Value = True And CHKBG.Value = 1 And CHKSN.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 900000
End If
If OPTJK.Value = True And CHKBG.Value = 1 And CHKSN.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 800000
End If
If OPTBT.Value = True And CHKBG.Value = 1 And CHKSN.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 700000
End If
End Sub
If OPTJK.Value = True And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 700000
End If
If OPTJK.Value = True And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 500000
End If
If OPTBT.Value = True And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 600000
End If
If OPTBT.Value = True And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 400000
End If
If OPTJK.Value = True And CHKBG.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 900000
End If
If OPTBT.Value = True And CHKBG.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 800000
End If
If OPTJK.Value = True And CHKSN.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 800000
End If
If OPTBT.Value = True And CHKSN.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 700000
End If
If OPTJK.Value = True And CHKBG.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 800000
End If
If OPTBT.Value = True And CHKBG.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 600000
End If
If OPTJK.Value = True And CHKSN.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 700000
End If
If OPTBT.Value = True And CHKSN.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 500000
End If
If OPTJK.Value = True And CHKBG.Value = 1 And CHKSN.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 1000000
End If
If OPTBT.Value = True And CHKBG.Value = 1 And CHKSN.Value = 1 And CBOJN.Text = “BISNIS” Then
TXTTB.Text = 900000
End If
If OPTJK.Value = True And CHKBG.Value = 1 And CHKSN.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 800000
End If
If OPTBT.Value = True And CHKBG.Value = 1 And CHKSN.Value = 1 And CBOJN.Text = “EKONOMI” Then
TXTTB.Text = 700000
End If
End Sub
Private Sub Form_Load()
CBOJN.AddItem “BISNIS”
CBOJN.AddItem “EKONOMI”
End Sub
CBOJN.AddItem “BISNIS”
CBOJN.AddItem “EKONOMI”
End Sub
Catatan : rumus disesuaikan dengan nama yg sudah diset sebelumnya.
Cth : checkbox “bagasi” >> chkBG.
7. Klik tombol “PLAY”
Selamat Mencoba sobat…!Kamu memang Hebat...
Lanjutkan Membaca Artikel Lainnya, diantaranya :
Artikel Umum .1
Artikel Pendidikan .2
Artikel Komputer .3
Artikel Visual Basic .4
Artikel Pribadi-ku .5
Artikel Religion .6
0 komentar:
Posting Komentar
Terimakasih atas Umpan baliknya, Good Lucky...!
GOD Bless Us....!