Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (5 Votes)
An example for beginners, showing how to use the MoveToEx and LineTo API calls. Gets the current time, converts it into (x,y) coordinates and draw the "clock"...DON'T FORGET: DON'T EVEN THINK ABOUT VOTING FOR ME!!!
API DeclarationsPublic Declare Function MoveToEx Lib "gdi32" Alias "MoveToEx" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As POINTAPI) As Long
Public Declare Function LineTo Lib "gdi32" Alias "LineTo" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
Public Type POINTAPI
x As Long
y As Long
End Type
Download Analogic Clock (4 KB)