c.haslam Posted September 22, 2008 Share Posted September 22, 2008 #include <GUIConstants.au3> $Form1 = GUICreate("Form 1", 300, 300, 200, 200 ) $btn = GUICtrlCreateButton("Change cursor",20,20,100,40) $lbl = GUICtrlCreateLabel("Arrow ",20,100) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btn fn() EndSwitch WEnd Func fn() Local $Cursor_WAIT = 15 GUISetCursor($Form1,$Cursor_WAIT,1) GUICtrlSetData($lbl,"Hourglass") sleep(3000) GUISetCursor($form1,2,1) GUICtrlSetData($lbl,"Arrow") EndFunc Why does the cursor not change to an hourglass? ...chris Spoiler CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard Link to comment Share on other sites More sharing options...
Achilles Posted September 22, 2008 Share Posted September 22, 2008 I'm not sure what you were thinking as for parameters, but they have to be in order. Try this: #include <GUIConstants.au3> $Form1 = GUICreate("Form 1", 300, 300, 200, 200 ) $btn = GUICtrlCreateButton("Change cursor",20,20,100,40) $lbl = GUICtrlCreateLabel("Arrow ",20,100) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btn fn() EndSwitch WEnd Func fn() Local $Cursor_WAIT = 15 GUISetCursor($Cursor_WAIT, 1) GUICtrlSetData($lbl,"Hourglass") sleep(3000) GUISetCursor(2, 1) GUICtrlSetData($lbl,"Arrow") EndFunc My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now