Modify ↓
Opened 18 years ago
Closed 18 years ago
#375 closed Bug (No Bug)
GUICtrlSetState($GUI_DISABLED) delayed in Vista
| Reported by: | MikeOsdx | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.2.12.0 | Severity: | None |
| Keywords: | GUICtrlSetState | Cc: |
Description
GUICtrlSetState() does not seem to take effect imediately when being run on Windows Vista.
See http://www.autoitscript.com/forum/index.php?showtopic=73364&pid=534785&st=0&#entry534785 for further info.
Attachments (0)
Note:
See TracTickets
for help on using tickets.

This is not a bug. If you notice, the controls fade out in a sort of animation. This takes time, obviously. This fading is likely done via WM_TIMER (Speculation, I didn't check). Well, the SAPI object is blocking whatever is performing the animation. If it is indeed a WM_TIMER message doing the fading, then the SAPI object would prevent AutoIt from processing it's message queue, which means those WM_TIMER events would be backed up until AutoIt gets a chance to process them again.
There are 2 solutions. Find which of Vista's appearance settings affects control animations. I turned all of them off and I do not get the problem any longer. Turning them all off isn't necessary, there's a various obviously named preference but I did not confirm if it was the culprit. The second, more reasonable solution is to simply insert a minor sleep statement. I wouldn't think you'd need over 250ms and could probably get away with less. You have to let the animation complete before starting the SAPI call as it's obviously blocking the animation from completing.
Closing as no bug.