Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Lib "kernel32" 1

Status
Not open for further replies.

labanTek

Instructor
Joined
Dec 3, 2004
Messages
37
Hi all I was observing the following code for a countdown timer, can anyone explain how does importing this Lib "kernel32" library into the function, cause an initial time to be returned? I would like to find out more about is contained within these libraries. Part of the code is below.
Any help will be appreciated. Thanks in advance.

Option Compare Database
Option Explicit

Dim TotalElapsedMilliSec As Long
Dim StartTickCount As Long
Private Declare Function GetTickCount Lib "kernel32" () As Long


Private Sub btnStartStop_Click()
If Me.TimerInterval = 0 Then
StartTickCount = GetTickCount()
 
GetTickCount is a Windows API, which is found in the kernel32.dll library, I think.

For more info, you could probably have a look at or perhaps forum711 or forum713 - also look at some of the handy wrappers for APIs found at
Roy-Vidar
 
Thanks so much Roy-Vidar the first link was most useful, it opened a whole new window of API programming to me. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top