CodeItBetter Programming Another VB Programming Blog

How to pause/sleep the application for the given number of milliseconds

Posted on January 5, 2009

The following vb6 code will help to pause the application for given number of milliseconds. The code uses Sleep API.

1
2
3
4
5
6
7
8
'System & API - How to pause/sleep the application for the given number of milliseconds
Option Explicit
 
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
 
Public Sub Pause(ByVal seconds As Single)
    Call Sleep(Int(seconds * 1000#))
End Sub

Related posts:

  1. How to Pause our application
  2. How to Pause the application without using Sleep
  3. How to handle Size & Position of Console Application with Windows Application in VB6
  4. How to use timer control for more than 65,535 milliseconds
  5. How to Crash your application (in two ways)
  6. How to terminate an application
  7. How to Retrieve The Length Of WAV, AVI And MIDI Files
  8. How to measure how much time it takes to execute a function or a block of code or event a statement
  9. How to open any file with its default application
  10. How to Set Mouse Double Click Time

Comments (1) Trackbacks (0)
  1. Is there anyway you could tell a novice how to implement this? I am hoping to put it into an access form.


Leave a comment


No trackbacks yet.