Jump to content
Sign in to follow this  
ZiggyStardust

Need to temporarily turn off mouse pointer

Recommended Posts

ZiggyStardust

I am writing a script and need to turn off the mouse pointer for the duration of the script then turn it back on when the script exits. I have looked through WinAPI and WinAPIEx and both seem to elude to doing it but I can find nothing specfic. Has anyone done this before?

Share this post


Link to post
Share on other sites
Akarillon

Why does the mouse pointer have to vanish?

Just lock it in place at the bottom or something with _MouseTrap. :)


Challenge accepted!

Share this post


Link to post
Share on other sites
Belini

@ ZiggyStardust to block the mouse can use the UDF BlockInputEx made ​​by MrCreatoR:

To hide the pointer:

DllCall("user32.dll", "int", "ShowCursor", "int", False); Hide pointer
sleep(1000)
DllCall("user32.dll", "int", "ShowCursor", "int", False); Show pointer

Share this post


Link to post
Share on other sites
ZiggyStardust

I found reference to show and hide cursor in WinAPI and WInAPIEX. I was wondering if Cursor and Pointer were the same thing. For some reason this didn't work:

DllCall("user32.dll", "int", "ShowCursor", "int", False); Hide pointer

sleep(1000)

DllCall("user32.dll", "int", "ShowCursor", "int", False); Show pointer

Neither did the ones in the WinAPI UDF. What am I doing wrong?

Share this post


Link to post
Share on other sites
Belini
ZiggyStardust

Thanks guys. Very, very helpful. Either MouseTrap or the above hide mouse pointer.rar work. The nice thing about MouseTrap is that it will work when BlockInputEx is in effect. MouseClick will not. Thanks a million!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×