Welcome back to my blog arybyan

GHOZALI COURSE

Membuat form input pendaftaran " GHOZALI COURSE "

vb6
Program ghozali course vb6


Logika Program :

1. Prosedur aktif, non aktif, bersih
2. Saat dijalankan tampil tanggal secara otomatis dan kondisi form tidak aktif
3. Klik New, form aktif dan kursor di No Pendaftaran
4. Kode materi di enter tampil nama materi dan harga
    Jika kode " FM01 " nama " VISUAL BASIC " harga : 500000
    Jika kode " FM02 " nama " VISUAL FOXPRO " harga : 400000
    Jika kode " FM03 " nama " PHP " harga : 1000000
5. JIka memilih kategori tampil potongan dan total bayar
    Jika anggota maka potongan 10% dari biaya
    Jika non anggota maka potongan = 0
    Total bayar = ( biaya - potongan )
6. Bayar diinput tampil kembali ( bayar - total )
7. Klik keluar maka kembali ke design

Sub aktif()
Text1.Enabled = True
Text2.Enabled = True
tgl.Text = Date
kdmateri.Enabled = True
nmmateri.Enabled = True
biaya.Enabled = True
txtpotongan.Enabled = True
txttotbay.Enabled = True
txtubay.Enabled = True
txtukem.Enabled = True

Option1.Value = False
Option2.Value = False
End Sub

Sub nonaktif()
Text1.Enabled = False
Text2.Enabled = False
tgl.Text = Date
kdmateri.Enabled = False
nmmateri.Enabled = False
biaya.Enabled = False
txtpotongan.Enabled = False
txttotbay.Enabled = False
txtubay.Enabled = False
txtukem.Enabled = False

Option1.Value = False
Option2.Value = False

End Sub
Sub bersih()
Text1.Text = ""
Text2.Text = ""
kdmateri.Text = ""
nmmateri.Text = ""
biaya.Text = ""
txtpotongan.Text = ""
txttotbay.Text = ""
txtubay.Text = ""
txtukem.Text = ""

Option1.Value = False
Option2.Value = False

End Sub

Private Sub cmdcancel_Click()
nonaktif
bersih
End Sub

Private Sub Form_Load()
nonaktif
bersih
End Sub

Private Sub cmdnew_Click()
aktif
bersih
Text1.SetFocus
End Sub

Private Sub cmdexit_Click()
Dim a As String
a = MsgBox("Yakin arep metu son ?? ", vbQuestion + vbOKCancel, "Informasi")
If a = vbOK Then
End
End If
End Sub


Private Sub kdmateri_KeyPress(keyascii As Integer)
If keyascii = 13 Then
If kdmateri.Text = "FM01" Then
    nmmateri.Text = "Visual Basic"
    biaya.Text = 300000
Else
If kdmateri.Text = "FM02" Then
    nmmateri.Text = "Visual FoxPro"
    biaya.Text = 400000
Else
If kdmateri.Text = "FM03" Then
    nmmateri.Text = "PHP"
    biaya.Text = 100000
End If
End If
End If
End If
End Sub

Private Sub Option1_Click()
txtpotongan = Val(biaya) / 100 * 10
txttotbay.SetFocus
End Sub

Private Sub Option2_Click()
txtpotongan = 0
End Sub


Private Sub txtpotongan_Change()
txttotbay = Val(biaya.Text) - Val(txtpotongan.Text)
End Sub

Private Sub txtubay_change()
txtukem = Val(txtubay) - (txttotbay)
End Sub

vb6
Ghozali course vb6



Selamat Mencoba

تعليقان (2)

  1. Thanks gan ..sangat membantu..
  2. Oke oke...