Opened 5 months ago

Last modified 8 weeks ago

#3984 closed Bug

GUICtrlSetGraphic stops working after Sleep — at Initial Version

Reported by: Nine Owned by:
Milestone: Component: AutoIt
Version: 3.3.16.1 Severity: None
Keywords: Cc:

Description

As title says, only first circle is displayed. But if you remove the Sleep line in the loop, all 5 circles are displayed as intented...

#include <GUIConstants.au3>

Local Const $size = 10, $xPos = 20, $yPos = 50, $Colour = "0x21FA06"

GUICreate("Example", 300, 300)
GUISetState()
GUICtrlCreateGraphic(0, 0, 300, 300)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Colour, $Colour)

For $i = 0 To 4
  GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, $xPos + (($i + 1) * $size * 1.3), $yPos, $size, $size)
  Sleep(500)
  ConsoleWrite($i & @CRLF)
Next

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

Change History (0)

Note: See TracTickets for help on using tickets.