Jump to content

Busy cursor not shown when hovering over control items

Recommended Posts


When I set the busy cursor on the main gui, it returns to a normal cursor when hovering over any of the controls on the gui window.  This behavior happens regardless of whether I set the 'override' parameter to 1 or to 0.
Here is my test code:

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

Opt("GUICloseOnESC", 1) ; ESC closes GUI? (0 = no, 1 = yes)
Opt("GUIOnEventMode", 1) ; Change to OnEvent mode
Opt('MustDeclareVars', 1)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $hMainWin, $statusID, $cnt = 0


Func _Main()
    Local $msg

    $hMainWin = GUICreate("cursor test", 250, 200, -1, -1)

    GUICtrlCreateListView("ABCdef", 10, 10, 100, 100)

    GUICtrlCreateButton("override = 1", 130, 10, 100, 25)
    GUICtrlSetOnEvent(-1, "handle_SetCur_1_btn")

    GUICtrlCreateButton("override = 0", 130, 50, 100, 25)
    GUICtrlSetOnEvent(-1, "handle_SetCur_0_btn")

    $statusID = GUICtrlCreateLabel("", 10, 120, 200, 20)
    GUICtrlSetBkColor(-1, 0xFFFF00)

    GUISetOnEvent($GUI_EVENT_CLOSE, 'Event_GUIClose')

    GUISetState() ; Make everything visible

    While (1)
        $msg = GUIGetMsg()
            Case $msg = $GUI_EVENT_CLOSE

EndFunc   ;==>_Main

Func Event_GUIClose()
EndFunc   ;==>Event_GUIClose

Func handle_SetCur_1_btn()

    If (Mod($cnt, 2)) Then
        setIT(15, 1)
        setIT(2, 1)

    $cnt += 1
EndFunc   ;==>handle_SetCur_1_btn

Func handle_SetCur_0_btn()
    If (Mod($cnt, 2)) Then
        setIT(15, 0)
        setIT(2, 0)
    $cnt += 1
EndFunc   ;==>handle_SetCur_0_btn

Func setIT($cursorID, $override)
    Local $str

    GUISetCursor($cursorID, $override, $hMainWin)

    $str = "Set " & (($cursorID = 2) ? " normal" : " busy") & " cursor."
    $str &= " (override = " & $override & ")"
    ConsoleWrite("+++: " & $str & @CRLF)
    GUICtrlSetData($statusID, $str)

EndFunc   ;==>setIT


Share this post

Link to post
Share on other sites


I'll try to find a download for a newer version.


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

  • Similar Content

    • AndreyS
      By AndreyS
      Tell me, please, how to set / change the cursor over RichEdit (created with _GUICtrlRichEdit_Create)?
    • StMaSi
      By StMaSi
      Two questions...
      When presenting a form containing a richedit control, is there any way to make the displayed text, within said richedit control, non-selectable?
      In addition, is there any way to hide the vertical line cursor, within said richedit control?
    • algiuxas
      By algiuxas
      I want that when mouse cursor is in GUI, cursor would hide, and when cursor is outside GUI it would appear again.

      (Sorry for my bad English)
    • xiantez
      By xiantez
      Hey Community,
      I was changing around my color scheme manually for syntax highlighting. I really enjoy using a dark background color. However, this seems to be problematic because my blinking cursor is also very dark. Is there a setting in the ScITE config where I can manipulate the blinking cursor to be a different color like "white" so it is easy to spot when coding. The closest thing I found was "Caret Line Color", but this just changes the line highlight.  Your help is greatly appreciated!!

    • knucklesCZ
      By knucklesCZ
      Hello to all autoit coders, I'm not a pro dev but I've recently made a few automatisation programs. I met a program SplashTop which allows user to control their PC from android phone and play games through it (e.g. Skyrim or any other game with first person camera). The program is perfect but it's totally missing one thing - mouse move. It only allows mouse click&drag as user moves their finger on the touch screen.I was thinking about using physical phone keyboard <>^(and down) to mouse move but not many ppl have got qwerty phones such motorola droid 4 or similar and I can transfer <>^ into mousemove. The question is if any of you know a way to disable mouse click&drag and convert it into  mousemove. Thanks for responses, I'm sorry but I can't make paragraphs on mobile version