Berikut
langkah-langkah membuat jam dan tanggal keren terbaru
Buat
Project dengan :
2
buah Label
1
Timer
Seperti
gambar dibawah ini:

Ketik
/ copy-paste source code dibawah ini
Video 1
Video 1
Dim Hari As String
Dim JHari
Private Sub Form_Load()
JHari = Array("Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu")
Timer1.Interval = 500
Form1.BackColor = vbBlack
Label1.Alignment = 2
Label1.BackStyle = 0
Label1.BorderStyle = 1
Label1.Font = "Century Schoolbook"
Label1.FontBold = True
Label1.FontSize = 16
Label1.ForeColor = &HFFFF00
Label2.Alignment = 2
Label2.BackStyle = 0
Label2.BorderStyle = 1
Label2.Font = "Century Schoolbook"
Label2.FontBold = True
Label2.FontSize = 16
Label2.ForeColor = &HFFFF00
End Sub
Private Sub Timer1_Timer()
Hari = JHari(Abs(Weekday(Date) - 1))
Label2.Caption = "" & Hari & ", " & Format(Date, "dd mmmm yyyy")
Label1.Caption = Format(Time, "hh:mm:ss")
End Sub
Jika
anda mengikuti langkah diatas maka hasilnya seperti gambar pertama diatas Video 1
Video 1

No comments:
Post a Comment