BIKIN DETEKSI WAKTU YUKKK

Siapa yang mau ikutan bikin Deteksi waktu ??? hayoo siapa  hayooo ???
lebeee
monggo dilihat dulu desainnya


okk add kebutuhan untuk membuat sebuah deteksi waktu nya okk

  • tambahkan 4 buah  frame
  • 1 buah text box
  • kemudian add module
  • 1 buah label
  • 4 buah radio button
  • uppss jangan lupa tambahkan timer dan set interval nya menjadi 1000
berikut source code nya :
letakan kode berikut pada module 
Declare Function GetTickCount Lib "kernel32" () As Long
Dim tanggal, jam, kiri As Integer

dan kemudian copas juga source code berikut :
Private Sub Command3_Click()
Unload Me

End Sub

Private Sub Timer1_Timer()
tanggal = Format(Date, "dd-mmmm-yyyy")
jam = Format(Time, "hh:mm:ss")
Label2.Caption = jam & " " & tanggal
If Option1.Value = True Then
    kiri = (GetTickCount \ 1000) / 3600
    Text1.Text = Left(kiri, 4) & " JAM"
ElseIf Option2.Value = True Then
    Text1.Text = (GetTickCount \ 1000) \ 60 & " MENIT"
ElseIf Option3.Value = True Then
    Text1.Text = (GetTickCount \ 1000) & " DETIK"
Else
    Text1.Text = (GetTickCount) & " MILI DETIK"
End If
End Sub


No comments:

Post a Comment