Sign in to follow this  
Followers 0
potitpanda

How to Hide mouse cursor

6 posts in this topic

Hello everybody

I want to hide mouse cursor in my script because, it run silently an application that cannot be stopped.

How can I hide the Arrow cursor of the mouse ?

Thanks

Share this post


Link to post
Share on other sites



_WinAPI_ShowCursor($fShow)


In the beginning there was nothing and then even that exploded - anonymous

Share this post


Link to post
Share on other sites

Which lot of functions have to include this command ?

I Want to hide cursor from all the screen and not only a GUI.

Share this post


Link to post
Share on other sites

A quick search on google shows that there is a windows system method cursor.hide

I guess that this method is called by the function I referred to. The system method is only for one window indeed. I don't have any experience with hiding the cursor from all windows, but I guess that a inquire of all windows and a do loop over all these windows should work.

note that it is a known fact that not all programs handle this cursor.hide well. Powerpoint e.g. doesn't obey

Private Sub myButton_MouseEnter(sender As Object, e As System.EventArgs) Handles myButton.MouseEnter
   ' Hide the cursor when the mouse pointer enters the button.
   Cursor.Hide()
End Sub 'myButton_MouseEnter
     
     
Private Sub myButton_MouseLeave(sender As Object, e As System.EventArgs) Handles myButton.MouseLeave
   ' Show the cursor when the mouse pointer leaves the button.
   Cursor.Show()
End Sub 'myButton_MouseLeave

In the beginning there was nothing and then even that exploded - anonymous

Share this post


Link to post
Share on other sites

What if you just hide the cursor (GUISetCursor(16,1)), and then _MouseTrap() the mouse to a location in the window where you hid the cursor?


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

Hello everybody

I want to hide mouse cursor in my script because, it run silently an application that cannot be stopped.

How can I hide the Arrow cursor of the mouse ?

Thanks

If your using your own gui you can hide the mouse while the cursor is over your gui

#Include <WinAPI.au3>

GuiCreate("",500,500)
GuiSetState()

_WinAPI_ShowCursor(False)

Sleep(5000)
_WinAPI_ShowCursor(True)
Sleep(5000)

Failing that there is a UDF mouseTrap I think it's called, do a search or use BlockInput() while the installer is running.

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  
Followers 0