Jump to content

How to Hide mouse cursor


Recommended Posts

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

Link to comment
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.

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...