19 Apr 2011
contoh vb 2 (visual basic)
scripnya
Private Sub Check1_Click()
check2.Enabled = False
If check1.Value = 1 Then
txtbonus.Text = "BUKU TULIS"
Else
txtbonus.Text = ""
End If
End Sub
Private Sub Check2_Click()
check1.Enabled = False
If check2.Value = 1 Then
txtbonus.Text = "BURUAN DAFTAR"
End If
End Sub
Private Sub cmbbulan_click()
cmbtahun.Enabled = True
End Sub
Private Sub cmbkode_Change()
txtnama.Enabled = True
End Sub
Private Sub cmbtahun_Click()
ctepat.Enabled = True
cterlambat.Enabled = True
End Sub
Private Sub cmbtanggal_click()
cmbbulan.Enabled = True
End Sub
Private Sub cmdclear_Click()
txtbuku.Text = ""
txtjumbel.Text = ""
txtharga.Text = ""
txttotal.Text = ""
txtppn.Text = ""
txtsub.Text = ""
txtubay.Text = ""
txtukem.Text = ""
check1.Value = 0
check2.Value = 0
check1.Enabled = False
check2.Enabled = False
End Sub
Private Sub cmdhitung_Click()
txttotal.Text = Val(txtjumbel.Text) * (txtharga.Text)
txtppn.Text = 0.05 * Val(txttotal.Text)
txtsub.Text = Val(txtppn.Text) + Val(txttotal.Text)
End Sub
Private Sub cmdinput_Click()
nonaktif
bersih
cmbkode.Enabled = True
End Sub
Private Sub cmdukem_Click()
txtukem.Text = Val(txtubay.Text) - Val(txtsub.Text)
listbonus.Enabled = True
check1.Enabled = True
check2.Enabled = True
End Sub
Private Sub Combo1_Change()
opt1.Enabled = True
opt2.Enabled = True
End Sub
Private Sub Command3_Click()
p = MsgBox("anda yakin ingin keluar", 32 + 4, "informasi")
If p = 6 Then
Unload Me
End If
End Sub
Private Sub ctepat_change()
listbonus.Enabled = False
cterlambat.Enabled = False
End Sub
Private Sub cterlambat_change()
listbonus.Enabled = True
ctepat.Enabled = False
End Sub
Private Sub ctepat_Click()
cterlambat.Enabled = False
txtcontoh.Text = "KARIAWAN TELADAN"
txtbuku.Enabled = True
txtjumbel.Enabled = True
txtharga.Enabled = True
End Sub
Private Sub cterlambat_Click()
ctepat.Enabled = False
listbonus.Enabled = True
txtbuku.Enabled = True
txtjumbel.Enabled = True
txtharga.Enabled = True
txtcontoh.Enabled = False
End Sub
Private Sub Form_Activate()
listbonus.Enabled = False
cmbkode.Enabled = False
txtmasuk.Enabled = False
cmbtanggal.Enabled = False
cmbbulan.Enabled = False
cmbtahun.Enabled = False
listbonus.Enabled = False
opt1.Enabled = False
opt2.Enabled = False
ctepat.Enabled = False
cterlambat.Enabled = False
txtnama.Text = ""
txtmasuk.Text = ""
listbonus.Text = ""
opt1 = "0"
opt2 = False
listbonus.Text = "*******"
txtbuku.Enabled = False
txtjumbel.Enabled = False
txtharga.Enabled = False
check1.Enabled = False
check2.Enabled = False
cmdukem.Enabled = False
cmdhitung.Enabled = False
p1.Enabled = False
End Sub
Private Sub Form_Load()
cmbtanggal.AddItem "01"
cmbtanggal.AddItem "02"
cmbtanggal.AddItem "03"
cmbtanggal.AddItem "04"
cmbtanggal.AddItem "05"
cmbtanggal.AddItem "06"
cmbtanggal.AddItem "07"
cmbtanggal.AddItem "08"
cmbtanggal.AddItem "09"
cmbtanggal.AddItem "10"
cmbtanggal.AddItem "11"
cmbtanggal.AddItem "12"
cmbtanggal.AddItem "13"
cmbtanggal.AddItem "14"
cmbtanggal.AddItem "15"
cmbtanggal.AddItem "16"
cmbtanggal.AddItem "17"
cmbtanggal.AddItem "18"
cmbtanggal.AddItem "19"
cmbtanggal.AddItem "20"
cmbtanggal.AddItem "21"
cmbtanggal.AddItem "22"
cmbtanggal.AddItem "23"
cmbtanggal.AddItem "24"
cmbtanggal.AddItem "25"
cmbtanggal.AddItem "26"
cmbtanggal.AddItem "27"
cmbtanggal.AddItem "28"
cmbtanggal.AddItem "29"
cmbtanggal.AddItem "30"
cmbtanggal.AddItem "31"
cmbbulan.AddItem "januari"
cmbbulan.AddItem "febuary"
cmbbulan.AddItem "maret"
cmbbulan.AddItem "april"
cmbbulan.AddItem "mei"
cmbbulan.AddItem "juni"
cmbbulan.AddItem "juli"
cmbbulan.AddItem "agustus"
cmbbulan.AddItem "september"
cmbbulan.AddItem "oktober"
cmbbulan.AddItem "november"
cmbbulan.AddItem "desember"
End Sub
Private Sub opt1_Click()
cmbtanggal.Enabled = True
txtmasuk.Text = " 08.00-14.00"
End Sub
Private Sub opt2_Click()
cmbtanggal.Enabled = True
txtmasuk.Text = " 14.00-22.00"
End Sub
Private Sub Picture2_Click()
End Sub
Private Sub p1_Click()
End Sub
Private Sub Timer1_Timer()
lbltime.Caption = Time
lbldate.Caption = Date
End Sub
Sub bersih()
txtnama.Text = ""
txtmasuk.Text = ""
listbonus.Text = ""
opt1 = "0"
opt2 = False
listbonus.Text = "0"
listbonus.Text = "0"
cmbkode.Text = "--Masukan No ID--"
End Sub
Sub nonaktif()
listbonus.Enabled = False
cmbkode.Enabled = False
txtmasuk.Enabled = False
cmbtanggal.Enabled = False
cmbbulan.Enabled = False
cmbtahun.Enabled = False
listbonus.Enabled = False
opt1.Enabled = False
opt2.Enabled = False
ctepat.Enabled = False
cterlambat.Enabled = False
txtbuku.Enabled = False
txtjumbel.Enabled = False
txtharga.Enabled = False
check1.Enabled = False
check2.Enabled = False
cmdukem.Enabled = False
cmdhitung.Enabled = False
cmbkode.Text = "--Masukan No ID--"
End Sub
Sub aktif()
listbonus.Enabled = True
cmbkode.Enabled = True
txtmasuk.Enabled = True
cmbtanggal.Enabled = True
cmbbulan.Enabled = True
cmbtahun.Enabled = True
listbonus.Enabled = True
listbonus.Enabled = True
opt1.Enabled = True
opt2.Enabled = True
ctepat.Enabled = True
cterlambat.Enabled = True
ctepat.Enabled = True
cterlambat.Enabled = True
txtbuku.Enabled = True
txtjumbel.Enabled = True
txtharga.Enabled = True
check1.Enabled = True
check2.Enabled = True
cmdukem.Enabled = True
cmdhitung.Enabled = True
cmbkode.Text = "--Masukan No ID--"
End Sub
Private Sub txtharga_Change()
cmdhitung.Enabled = True
End Sub
Private Sub txtnama_Change()
opt1.Enabled = True
opt2.Enabled = True
txtmasuk.Enabled = True
End Sub
Private Sub txtubay_Change()
cmdukem.Enabled = True
End Sub
Langganan:
Posting Komentar (Atom)
Entri Populer
-
IPK itu istilahnya bentuk penggambaran prestasi seseorang jika dinilai dalam angka... namun perlu diperhatikan bahwa sifat manusia adalah B...
-
Add caption contoh program Vb sederhana. penilaian kelulusan mahasiswa... listingnya : Private Sub Command1_Cl...
blog ane ^^
Arsip Blog
guitar
keluarga
- kriepiek pueduez
- jakarta, Indonesia
- memang benar apa yang kita dapat dari pada mengharap ketidak pastian orang lain
Tidak ada komentar:
Posting Komentar