|
Post by beginner101 on Feb 21, 2020 10:29:25 GMT -5
I've created a racing game. However during the race any mouse input causes havok when the race is completed. Is there anyway to: 1- Ignore or clear mouse input while the race is being run (or before continuing with the program) or 2-Hide the mouse during the race and Show it afterwards?
Back in about 1995 I used:
xLoc=10 :yLoc=10
calldll #a, "SetCursorPos",_
xLoc as ushort,_
yLoc as ushort,_
result as void
To control the mouse but alas it no longer works!
Thanks Clint
|
|
Tasp
Full Member
Posts: 215
|
Post by Tasp on Feb 21, 2020 11:30:42 GMT -5
Hey Clint,
Your code above works for me to move the mouse. But to hide it you need to use ShowCursor
If you want to hide the mouse you can use,
calldll #user32, "ShowCursor", bShow as long, displayCount as long TIMER 5000, [displayIT] WAIT
[displayIT] calldll #user32, "ShowCursor", 1 as long, displayCount as long
TIMER 0 END
|
|
|
Post by Rod on Feb 21, 2020 12:11:23 GMT -5
Sounds like you are building a queue of mouse events. The solution would be to turn the when mouse move event tracking off during the race.
|
|
|
Post by beginner101 on Feb 21, 2020 13:13:40 GMT -5
Thanks to both of you for replying.
The comment on event tracking lead me to google such and found that:
#a.a, "when leftButtonDown"
Turns off tracking!!!!!!!!!!!!!!!!
|
|