'formunuza iki tane timer yerlestirin.
Private Sub Form_Load()
Dim aci, i, t
AutoRedraw = True
Timer1.Interval = 1000 '1 saniye
Timer2.Interval = 10 '1 salise
ScaleMode = 3
For i = 0 To ScaleHeight
Line (0, i)-(ScaleWidth, i), i * 256
Next
ScaleMode = 1
Width = ScaleHeight
Scale (-20, 20)-(20, -20)
t = "QUARTZ"
CurrentX = -TextWidth(t) / 2
CurrentY = -1
Print t
t = "Talip Hakan ÖZTÜRK 2002-BAKU"
CurrentX = -TextWidth(t) / 2
CurrentY = -4
Print t
DrawWidth = 5
Circle (0, 0), 19, 65535
DrawWidth = 2
For aci = 0 To 360 Step 6
Line (18 * Cos(aci * 3.1415 / 180), 18 * Sin(aci * 3.1415 / 180))-(19 * Cos(aci * 3.1415 / 180), 19 * Sin(aci * 3.1415 / 180)), QBColor(5)
Next
DrawWidth = 4
For aci = 0 To 360 Step 6 * 5
Line (18 * Cos(aci * 3.1415 / 180), 18 * Sin(aci * 3.1415 / 180))-(19 * Cos(aci * 3.1415 / 180), 19 * Sin(aci * 3.1415 / 180)), QBColor(8)
Next
DrawMode = 7
End Sub
Private Sub Timer1_Timer()
Dim aci, saniye, dakika, saat, i
Static sx, sy, dx, dy, stx, sty
Caption = Time
DrawWidth = 2
Line (0, 0)-(sx, sy), QBColor(10)
saniye = Second(Time)
aci = -saniye * 6 + 90
sx = 18 * Cos(aci * 3.1415 / 180)
sy = 18 * Sin(aci * 3.1415 / 180)
Line (0, 0)-(sx, sy), QBColor(10)
DrawWidth = 3
Line (0, 0)-(dx, dy), QBColor(11)
dakika = Minute(Time)
aci = -dakika * 6 + 90
dx = 18 * Cos(aci * 3.1415 / 180)
dy = 18 * Sin(aci * 3.1415 / 180)
Line (0, 0)-(dx, dy), QBColor(11)
DrawWidth = 3
Line (0, 0)-(stx, sty), QBColor(12)
saat = Hour(Time)
aci = -saat * 30 + 90
stx = 12 * Cos(aci * 3.1415 / 180)
sty = 12 * Sin(aci * 3.1415 / 180)
Line (0, 0)-(stx, sty), QBColor(12)
If Minute(Time) = 0 Then Beep
End Sub
Private Sub Timer2_Timer()
Static sls
sls = (sls + 1) Mod 360
Dim aci
Dim sx, sy, dx, dy, stx, sty
DrawWidth = 1
aci = -sls * 3.6 + 90
sx = 3 * Cos(aci * 3.1415 / 180)
sy = 3 * Sin(aci * 3.1415 / 180)
Line (5, 5)-(5 + sx, 5 + sy), QBColor(10)
Line (-5, 5)-(-5 - sx, 5 - sy), QBColor(10)
End Sub