Dim IPS As String
Dim User As String
Private Sub cmdberhenti_Click()
ws.SendData "BERHENTI-" & User
Me.Timer1.Enabled = False
Me.biaya.Text = Val(Hour(Me.pemakaian.Value)) + Val(Minute(Me.pemakaian.Value)) * (3000 / 60)
End Sub
Private Sub cmdmulai_Click()
ws.SendData "MULAI-" & User & "-Gunawan"
Me.jam_mulai.Value = Format(Now, "hh.mm.ss")
Me.Timer1.Enabled = True
End Sub
Private Sub Form_Load()
IPS = "192.168.10.1"
User = ws.LocalIP
ws.Connect IPS, 3000
Me.Timer1.Enabled = False
Me.biaya = ""
End Sub
Private Sub Timer1_Timer()
Me.jam_selesai.Value = Format(Now, "hh.mm.ss")
Me.pemakaian.Value = Me.jam_selesai - Me.jam_mulai.Value
End Sub
Tidak ada komentar:
Posting Komentar