by ahaed aslam (1 Submission)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 28th January 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Simple code for drawing a clock
API Declarations
name first line as secLine
name second line as minLine
name third one as hourLine
set minLine.x1=secLine.x1=hourLine.x1
set minLine.Y1=secLine.y1=hourLine.y1
set the timer interval as 1000
secLine.x2=secLine.x1+150*cos(((seconds(time)-90)*6)*3.1415/180))
secLine.y2=secline.y1+150*sin(((seconds(time)-90)*6)*3.1415/180))
minLine.x2=minLine.x1+150*cos(((minute(time)-90)*6)*3.1415/180))
minLine.y2=minLine.y1+150*sin(((minute(time)-90)*6)*3.1415/180))
hourLine.x2=hourLine.x1+150*cos(((hour(time)-90)*30)*3.1415/180))
hourLine.y2=hourLine.y1+150*sin(((hour(time)-90)*30)*3.1415/180))