VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Desktop Clock

by Deepak Saxena (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 28th January 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Desktop Clock

Rate Desktop Clock



Private Sub Command2_Click()
frmClock.Width = 4395
End Sub

Private Sub Form_Load()
Call tmrQuartz_Timer
End Sub
Private Sub tmrQuartz_Timer()
Dim Hours As Single, Minutes As Single, Seconds As Single
Dim TrueHours As Single
lblTime.Caption = Time
'Beep
Hours = Hour(Time)
Minutes = Minute(Time)
Seconds = Second(Time)
TrueHours = Hours + Minutes / 60

' I made all the X1 and Y1 equal in the form
LineHour.X2 = 1000 * Cos(PI / 180 * (30 * TrueHours - 90)) + LineHour.X1
LineHour.Y2 = 1000 * Sin(PI / 180 * (30 * TrueHours - 90)) + LineHour.Y1
    
LineMinute.X2 = 1500 * Cos(PI / 180 * (6 * Minutes - 90)) + LineHour.X1
LineMinute.Y2 = 1500 * Sin(PI / 180 * (6 * Minutes - 90)) + LineHour.Y1

LineSecond.X2 = 1600 * Cos(PI / 180 * (6 * Seconds - 90)) + LineHour.X1
LineSecond.Y2 = 1600 * Sin(PI / 180 * (6 * Seconds - 90)) + LineHour.Y1
    
End Sub


Download this snippet    Add to My Saved Code

Desktop Clock Comments

No comments have been posted about Desktop Clock. Why not be the first to post a comment about Desktop Clock.

Post your comment

Subject:
Message:
0/1000 characters