Prev Index Next

Analog Clock

Timer example

Timer example

Notes: This program implements an analog clock. It starts a timer upon creation and every time that timer goes off it gets the current time and updates the screen. The program uses a set of points to represent the hands of the clock. While processing the timer message it uses the current time to determine the correct angle for the hands and then rotates the points.

Description: A screenshot of a program in front of a window containing code. The program displays an analog clock. The clock face is drawn as a series of black dots on a white background. There are larger dots for the hours and then four smaller dots between each hour dot. The seconds hand is a single line while the hour and minute hands are diamonds with the outside point stretched out.

Prev Index Next