A Simple Analog Clock that Adds Seconds Markers as it Counts

Category:
Multimedia/Games
Type:
Snippets
Difficulty:
Beginning
Author:
Anonymous

Version Compatibility: Visual Basic 6

More information:
The examples shows how to make a simple analog clock. The main theme is the co-ordinate system. Start Microsoft Visual Basic 6. Set the following properties for Form1. (Property=Value) BackColor=&H00000000&, BorderStyle=1-Fixed Single, Height=5970, Width=5940. Then add 2 Timer controls named 'timer1' and 'timer2' respectively and a command button named 'command1'. Set the interval properties for 'timer1' to 1000 and for 'timer2' to 10000. Add 3 Line control named 'Line1', 'Line2' and 'Line3' respectively. Add a Shape named 'Shape1' and set it's index property value to '0' and shape property value to '3-circle'. Add another Shape named 'Shape2' and set it's Shape property value to '3-circle'. Finally, add a 3rd shape control named shape3. That should be enough to get you up and running with this sample.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: