HOw does that work? It looks like C++ code, won't work when I run it. Do you have to declare thet before using it somehow (not declared error shows up)?
'E-Mail: KPDTeam@Allapi.net
'Hide the cursor
ShowCursor 0
'Wait 10 seconds
t = Timer
Do: DoEvents: Loop Until Timer > t + 10
'Show the cursor
ShowCursor 1
End Sub
Add this line to the declarations section of your form (or declare it as Public in a module):
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Then, anywhere in your code
'To hide the cursor (this is a comment)
ShowCursor 0
'To show the cursor again (this is also a comment)
ShowCursor 1
So it becomes a one-liner. How much simpler do you want it to be? Did you read Justin's tip (or paste it into a form module)?
Where in your code have you put either:
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
(declaration for form)
Or:
Public Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
(declaration for bas)
?
It must be declared somewhere, and with scope that is applicable to your usage. ie If you only want to use it on 1 form then declare it as Private in the declarations section of the form. If you want to use it in procedures on multiple forms (or in modules) then declare it as Public in a bas.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.