Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

Browse Topics

- Getting started
- Data Types
- Modules
- Operators in VB6
- VB6 Variable
- VB6 Procedures
- VB6 Control Structures
- Loops in VB6
- VB6 Exit Do & With End With
- Arrays in VB6
- User-Defined Data Types
- VB6 Constants
-
VB6 Built-in Functions
- Date and Time in VB6
- VB6 Controls
- TextBox Control
- ComboBox & OptionButton
- Label & Frame
- PictureBox & ImageBox
- Timer Control
- ListBox & ComboBox
- VB6 ScrollBar
- Control Arrays in VB6
- Files controls in VB6
- VB6 CheckBox
- Forms in VB6
- Menus in VB6
- MDI Form in VB6
- InputBox
- MessageBox
- Mouse events
- Mouse Move
- Error Handling
-
Error Handling (2)
-
VB6 Database

You are here: Visual Basic > VB6 (Beginners Tutorial)

Tutorial Main Page | Previous Page | Contents | Next Page

Timing with DLL Calls

• Many times you need some method of timing within an application. You may want to know how long a certain routine (needed for real-time simulations) takes to execute or want to implement some sort of delay in your code. The DLL function GetTickCount is very useful for such tasks.

• The DLL function GetTickCount is a measure of the number of milliseconds that have elapsed since Windows was started on your machine. GetTickCount is 85 percent faster than the Visual Basic Timer or Now functions. The GetTickCount function has no arguments. The returned value is a long integer. The usage syntax is:

Dim TickValue as Long
.
.
TickValue = GetTickCount()

Let’s look at a couple of applications of this function.

Quick Example 1: Using GetTickCount to Build a Stopwatch


  

Tutorial Main Page | Previous Page | Contents | Next Page

   

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved