by Waty Thierry (60 Submissions)
Category: Windows System Services
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 13th April 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Change cursor hourglass without taking care to set it back
' * Programmer Name : Waty Thierry
' * Web Site : www.geocities.com/ResearchTriangle/6311/
' * E-Mail : [email protected]
' * Date : 7/05/98
' * Time : 11:03
' * Module Name : class_Hourclass
' * Module Filename : Hourglass.cls
' **********************************************************************
' * Comments : Add easily mouse hourglass to you processing code
' * witouth any care about setting back the hourglass to previous pointer.
' *
' * You have to do as follow :
' * Private Sub YourFunction()
' *
' * Dim cHourglass As class_Hourglass
' * Set cHourglass = New class_Hourglass
' *
' * ' .... Do stuff
' * ' .... The hourglass will be reset to previous pointer once
' * ' .... you quit thefunction
' *
' * End Sub
' *
' **********************************************************************
Option Explicit
Private nOldMousPointer As Long
Private Sub Class_Initialize()
' *** Show the Hourglass
nOldMousPointer = Screen.MousePointer
Screen.MousePointer = vbHourglass
End Sub
Private Sub Class_Terminate()
' *** Show previous pointer
Screen.MousePointer = nOldMousPointer
End Sub