Mari kawan kita belajar visual basic mungkin lama-lama nanti kita semakin suka buat pemoggraman.
sekarang coba kita peraktekkan yang hoby visual basic ne..
dengan memakai coding di bawah ini
(1) Command 1 (start) --------------------- click
Private Sub Command1_Click()
mulai = Now()
Text2.Text = Format(mulai, "hh:mm:ss")
End Sub
(2) Command 2 (finish) -------------------click
Private Sub Command2_Click()
selesai = Now
lama = selesai - mulai
lm_menit = (Hour(lama) * 60 + Minute(lama))
biaya = lm_menit * 50
Text3.Text = Format(selesai, "hh:mm:ss")
Text4.Text = lm_menit
Text5.Text = "Rp." & biaya
End Sub
(3) Command 3 (tri again) ------------click
Private Sub Command3_Click()
Text1.Text = "5"
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
(4) Command 4 (exit)-------------------click
Private Sub Command4_Click()
Unload Me
End Sub
(5) Form ----------------------------load
Private Sub Form_Load()
Text1.Text = "5"
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
(General)----------------------(Declerations)
Dim mulai, selesai, lama As Variantselamat mencoba moga bermanfaat sob...
2 comments
thanks gan info nya bermanfaat ,
jangan lupa kunbal :
http://jomblank.blogspot.com
ok sob thenx :D
kunjungi blog gw ya
http://mueezafiles.blogspot.com
Posting Komentar