Jump to content
Sign in to follow this  
kiffab

Image Flicker

Recommended Posts

kiffab

Hi

I have an app which checks something every 10 seconds and updates the GUI with an image based on the check.

I placed the "default" picture on the GUI as follows:

$status = GUICtrlCreatePic("Images/image1.bmp", 10, 10, 100, 20)

Perform a check, then change the pic:

GUICtrlSetData($status, GUICtrlCreatePic("Images/image2.bmp", 10, 10, 100, 20))

The app checks every 10 seconds then sets the appropriate image.

Is there any way to avoid the flicker that occurs when changing the image? Or even reduce it?

Share this post


Link to post
Share on other sites
martin

Hi

I have an app which checks something every 10 seconds and updates the GUI with an image based on the check.

I placed the "default" picture on the GUI as follows:

$status = GUICtrlCreatePic("Images/image1.bmp", 10, 10, 100, 20)

Perform a check, then change the pic:

GUICtrlSetData($status, GUICtrlCreatePic("Images/image2.bmp", 10, 10, 100, 20))

The app checks every 10 seconds then sets the appropriate image.

Is there any way to avoid the flicker that occurs when changing the image? Or even reduce it?

Don't keep creating a new pic when you want to change the image; you'll end up with hundreds of pics but no way to access the old ones. Use GuiCtrlSetImage as advised in the help for GuiCtrlCreatePic.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.