VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simple code for drawing a clock

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

Rate Simple code for drawing a clock




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))



Download this snippet    Add to My Saved Code

Simple code for drawing a clock Comments

No comments have been posted about Simple code for drawing a clock. Why not be the first to post a comment about Simple code for drawing a clock.

Post your comment

Subject:
Message:
0/1000 characters