WinDOS Shell 0.1A
Submitted By:
Shehbaz
Rating:





(
Rate It)
VERSION 5.00
Begin VB.Form frmClock
BackColor = &H00000000&
BorderStyle = 0 'None
ClientHeight = 5370
ClientLeft = 0
ClientTop = 0
ClientWidth = 5370
FillColor = &H0000FF00&
LinkTopic = "Form1"
ScaleHeight = 5370
ScaleWidth = 5370
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
WhatsThisButton = -1 'True
WhatsThisHelp = -1 'True
Begin VB.Timer tmrTimer
Interval = 1000
Left = 4800
Top = 4080
End
Begin VB.Label cmdExit
BackStyle = 0 'Transparent
Caption = "Exit"
BeginProperty Font
Name = "Xenotron"
Size = 21.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 525
Left = 3915
TabIndex = 1
Top = 4860
Width = 1455
End
Begin VB.Shape shpClock
BorderColor = &H0000C000&
Height = 1995
Left = 0
Shape = 3 'Circle
Top = 0
Width = 1995
End
Begin VB.Line lnMinutes
BorderColor = &H0080FFFF&
BorderWidth = 2
X1 = 960
X2 = 2040
Y1 = 1020
Y2 = 1440
End
Begin VB.Line lnSeconds
BorderColor = &H0080FF80&
X1 = 960
X2 = 2340
Y1 = 1020
Y2 = 780
End
Begin VB.Line lnHours
BorderColor = &H00FFFF00&
BorderWidth = 5
X1 = 960
X2 = 1800
Y1 = 1020
Y2 = 1320
End
Begin VB.Label lblTime
AutoSize = -1 'True
BackStyle = 0 'Transparent
BeginProperty Font
Name = "OCR A Extended"
Size = 26.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 555
Left = 1320
TabIndex = 0
Top = 3360
Width = 315
End
End
Attribute VB_Name = "frmClock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const Pi As Single = 3.141592654
Const sFactor60 As Single = Pi / 30
Const sFactor12 As Single = Pi / 6
Const sRotateFactor As Single = Pi / 2
Dim sRadius As Single
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub Form_Resize()
If WindowState = vbMinimized Then Exit Sub
shpClock.Move 0, 0, ScaleWidth, ScaleHeight
lnSeconds.X1 = shpClock.Left + shpClock.Width 2
lnSeconds.Y1 = shpClock.Top + shpClock.Height 2
lnMinutes.X1 = lnSeconds.X1
lnMinutes.Y1 = lnSeconds.Y1
lnHours.X1 = lnSeconds.X1
lnHours.Y1 = lnSeconds.Y1
If ScaleWidth > ScaleHeight Then
sRadius = shpClock.Height 2
Else
sRadius = shpClock.Width 2
End If
tmrTimer_Timer
End Sub
Private Sub tmrTimer_Timer()
Dim t As Single
t = Format(Time, "s")
lnSeconds.X2 = Cos(t * sFactor60 - sRotateFactor) * sRadius + lnSeconds.X1
lnSeconds.Y2 = Sin(t * sFactor60 - sRotateFactor) * sRadius + lnSeconds.Y1
t = Format(Time, "n") + t / 60
lnMinutes.X2 = Cos(t * sFactor60 - sRotateFactor) * (sRadius - Screen.TwipsPerPixelX * 5) + lnSeconds.X1
lnMinutes.Y2 = Sin(t * sFactor60 - sRotateFactor) * (sRadius - Screen.TwipsPerPixelX * 5) + lnSeconds.Y1
t = Format(Time, "h") + t / 60
lnHours.X2 = Cos(t * sFactor12 - sRotateFactor) * (sRadius - Screen.TwipsPerPixelX * 10) + lnSeconds.X1 - 60
lnHours.Y2 = Sin(t * sFactor12 - sRotateFactor) * (sRadius - Screen.TwipsPerPixelX * 10) + lnSeconds.Y1 - 60
lblTime.Caption = Time
End Sub