Here is the basic code you would need. Put it in the enter event for any element, not otherwise used. Add a static box element to the form and name it "face". The face element will be the drawing element for the code. Then add a button that kicks off the interval code:
var time_str as string
var s_hour as string
var s_minute as string
var s_second as string
var hour as double
var min as double
var sec as double
var deg as double
var xx as double
var yy as double
var hour_in_minutes
time_str = @ServerTime()
s_hour = @mid(time_str, 1, 2)
s_minute = @mid(time_str, 4, 2)
s_second = @mid(time_str, 7, 2)
hour = @num(s_hour)
min = @num(s_minute)
sec = @num(s_second)
StaticDrawColor(face, 220, 220, 250)
StaticDrawCircle(face, 180, 180, 150)
deg = (6.28 / 60.0) * sec
xx = @cos(deg - 1.57) * 140.0
yy = @sin(deg - 1.57) * 140.0
StaticDrawColor(face, 100, 100, 100)
StaticDrawLine(face, 180, 180, 180 + xx, 180 + yy)
deg = (6.28 / 60.0) * min
xx = @cos(deg - 1.57) * 100.0
yy = @sin(deg - 1.57) * 100.0
StaticDrawColor(face, 50, 50, 50)
StaticDrawLine(face, 180, 180, 180 + xx, 180 + yy)
if(hour > 12)
{
hour = hour - 12
}
deg = (6.28 / 12.0) * hour
xx = @cos(deg - 1.57) * 60.0
yy = @sin(deg - 1.57) * 60.0
StaticDrawColor(face, 0, 0, 0)
StaticDrawLine(face, 180, 180, 180 + xx, 180 + yy)
ForceRedraw()
RunEntryOnInterval(Hide, 1000.0)
There is a lot you could do to pretty this up: add numbers, make the hands different thicknesses, more color. Right now, it ticks - not sweeps, so the hour hand is always on the current hour, the minute is the current minute, etc.
The .dsr and .ddt for this example are attached in the clock.zip file attached to this post.