|
-
Oct 15th, 2002, 08:08 AM
#1
Thread Starter
Hyperactive Member
Hide/Disable Mouse Pointer?
I'm using a touch screen program and when it's launched the mouse pointer remains on the screen.
What I'd like to do is either: -
1) Hide the mouse pointer when the application is running
or
2) Make the mouse pointer so small that it's gives the impression that it's not there.
When the application is closed I need to set the mouse pointer back to the default.
Has any one got any ideas?
Regards
-
Oct 15th, 2002, 08:11 AM
#2
Banned
VB Code:
Declare Function ShowCursor Lib "user32" Alias "ShowCursor" (ByVal bShow As Long) As Long
· bShow
Specifies whether the internal display counter is to be incremented or decremented. If bShow is TRUE, the display count is incremented by one. If bShow is FALSE, the display count is decremented by one.
This means if you call ShowCursor(False) for 5 times, you have to call it ShowCursor(True) 5 times before the cursor shows again.
-
Oct 15th, 2002, 08:11 AM
#3
VB Code:
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Sub Form_Load()
'KPD-Team 1998
'URL: [url]http://www.allapi.net/[/url]
'Hide the cursor
ShowCursor 0
'Wait 10 seconds
t = Timer
Do: DoEvents: Loop Until Timer > t + 10
'Show the cursor
ShowCursor 1
End Sub
-
Oct 15th, 2002, 08:12 AM
#4
Banned
We've used the same source
-
Oct 15th, 2002, 08:25 AM
#5
Yes we did, and you beat me to the punch!
-
Oct 15th, 2002, 08:33 AM
#6
Banned
I always have API-Guide in the tray
-
Oct 15th, 2002, 09:43 AM
#7
Thread Starter
Hyperactive Member
Many Thanks
Many thanks both!
While we're on the subject do either of you know how to do the same in Delphi?
Regards
-
Oct 15th, 2002, 10:02 AM
#8
Can you use Windows based APIs in Delphi?
I'm guessing the declarations would be different, but ShowCursor is part of the User32 library which is present on all Windows based machines.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|