Recommended Posts

RichardL 4

RichardL 4

I realised that I'd never used AutoIt to draw anything, and assumed that it didn't have pixel, line, circle etc. I looked in the help and found GUICtrlCreateGraphic and GUICtrlSetGraphic - wow, fantastic. Then I tried something dynamic and saw the flicker problem, which makes it useless for most things I'd want to do. There are several forum topics about the flicker, usually recommending using other graphic methods. There's one >topic with a post by Detefon that has the answer, but without sufficient recognition.

With the $WS_EX_COMPOSITED option the flicker is gone, and the 'wow fantastic' status is restored. (I've only tested on XP, and there are threads that indicate that it may flicker on W7.)

The code below is the help example from GUICtrlCreateGraphic,
+ the bezier graphic from the GUICtrlSetGraphic help
+ a label by each graphic to make it easier to see which code makes each graphic.
+ a dynamic bar derived from Detefon's bar.