home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "BouncerFuncs"
- Option Explicit
-
- #If Win32 Then
- Declare Function GetTickCount Lib "kernel32" () As Long
- Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
- #Else
- Declare Function GetTickCount Lib "User" () As Long
- Declare Sub SetCursorPos Lib "User" (ByVal X As Integer, ByVal Y As Integer)
- #End If
-
- ' ************************************************
- ' Pause until GetTickCount shows the indicated
- ' time. This is accurate to within one clock tick
- ' (55 ms), not counting variability in DoEvents
- ' and Windows itself.
- ' ************************************************
- Sub WaitTill(next_time As Long)
- Do
- DoEvents
- Loop While GetTickCount() < next_time
- End Sub
-
-
- ' ************************************************
- ' Make sure we should be running. Then start the
- ' main form.
- ' ************************************************
- Sub Main()
- ' Don't start if another instance is already
- ' running.
- If App.PrevInstance Then End
-
- ' If this is a configuration run, do nothing.
- If Command$ = "/c" Then End
-
- ' If this is not a screen saver run, do nothing.
- ' Comment this line out for test runs.
- ' If Command$ <> "/s" Then End
-
- ' Move the cursor off the screen.
- SetCursorPos Screen.Width, Screen.Height
-
- ' Show the main form.
- BounceForm.Show
- End Sub
-
-
-