VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

CMousePointer.cls

Dennis F McGrath  (1 Submission)   Miscellaneous   Visual Basic 5.0   Advanced   Wed 3rd February 2021

Greatly simplifies mousepointer control, while at the same time avoiding unnecessary changes (less flicker), and uses DoEvents to assure that the displayed mousepointer changes in a timely manner. -- At the top of any Sub/Function in which you want to control the mousepointer: Dim oMp As CMousePointer -- and -- Set oMp = New CMousepointer -- This will remember the current mousepointer and set the mousepointer to vbHourglass. -- If you actually want to force to vbDefault, as in an error handling Sub/Function, or in cases where you want to set to vbHourglass conditionaly, add: oMp.Houglass = False -- or -- oMp.Value = vbDefault -- You can use the Hourglass or Value properties to change the mousepointer anywhere else in your Function. -- In the exit routine: Set oMp = Nothing --
This will reset the mousepointer to whatever it was on entering the Sub/Function

Inputs
Two properties to be used on the few occasions where vbHourglass is not the desired mousepointer. Hourglass: A boolean, False being vbDefault. Value: Any valid mousepointer value.

Rate CMousePointer.cls (2(2 Vote))

Download CMousePointer.cls

CMousePointer.cls Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters