The following code is the clock that the component implementation of the DirectX called. It has three pointers that will change in real time with the changes in the system.
But I did not do the scale, because I think the program to draw the scale is not beautiful, using Photoshop to draw a bell as the background is much more beautiful.
<title> pointer Clock </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<body bgcolor= "#FFFFFF" text= "#000000" >
<div id= "Layclock" style= "Position:absolute; width:101; height:101px; Z-index:2; left:203px; top:101px ">
<object id= "Dacontrol" width=101 height=101 align=left hspace=0
Classid= "CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D" >
</object>
<script language= "VBScript" >
<!--
Set m = dacontrol.pixellibrary
PI = 3.14159265359
Sub Window_onload
A = time
Min1 = Minute (time)
HR1 = Hour (time)
SEC1 = second (time)
Set xpos = M.mul (M.danumber), M.cos (M.mul (0.3)))
Set YPos = M.mul (M.danumber), M.cos (M.mul (0.5)))
Set Clock = m.overlay (Hands (HR1,MIN1,SEC1), Hands (HR1,MIN1,SEC1))
Dacontrol.image = Clock
Dacontrol.start
End Sub
Function Hands (HR,MIN,SEC)
Set bvr60 = M.danumber (60)
Set secfrommidnight = M.add (M.danumber (hr*3600+min*60+sec), m.localtime)
Set Secbvr = M.mod (SECFROMMIDNIGHT,BVR60)
Set Minbvr = M.mod (M.Div (SECFROMMIDNIGHT,BVR60), bvr60)
Set Hrbvr = M.mod (M.Div (Secfrommidnight,m.danumber (3600)), M.danumber (12))
Ptssec = Array (-10,-2, 42,-1, 42, 1, -10,2)
Ptsmin = Array (-7,-2, 36,-1, 36, 1,-7, 2)
PTSHR = Array (-5,-3, 32,-1, 32, 1,-5, 3)
Set Temp1 = M.mul (M.danumber (-PI/30), M.sub (Secbvr,m.danumber (15))
Set Temp2 = M.mul (M.danumber (-PI/30), M.sub (Minbvr,m.danumber (15))
Set Temp3 = M.mul (M.danumber (-PI/6), M.sub (Hrbvr,m.danumber (3))
Set imgsec = M.polyline (ptssec). Fill (M.defaultlinestyle,m.solidcolorimage (M.cyan))
Set imgsec = Imgsec.transform (M.rotate2anim (TEMP1))
Set imgmin = M.polyline (ptsmin). Fill (M.defaultlinestyle,m.solidcolorimage (M.yellow))
Set imgmin = Imgmin.transform (M.rotate2anim (TEMP2))
Set imghr = M.polyline (PTSHR). Fill (M.defaultlinestyle,m.solidcolorimage (M.green))
Set imghr = Imghr.transform (M.rotate2anim (Temp3))
Set hands = M.overlay (Imgsec,m.overlay (IMGMIN,IMGHR))
End Function
-->
</SCRIPT></div>
</body>