Jump to content
Sign in to follow this  

Button flicker

Recommended Posts


Yes, I know this has been posted before. This is what I have. So, when checkbox $1 is checked, $OK is enabled, when it is enabled it flickers when you move your mouse, but not when it is disabled (which is where GUICtrlSetState($OK, $GUI_DISABLE) came into play). So, how could I make it so when $OK is activated, the button does not flicker?

$OK = GUICtrlCreateButton("Ok!", 252, 308, 40, 24)

bla bla bla

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $msg = $build
            If BitAND(GUICtrlRead($1),$GUI_CHECKED) Then
                GUICtrlSetState($OK, $GUI_ENABLE)
        Case -3

Share this post

Link to post
Share on other sites

Ah, thank you, perfect. :mellow:

Case $msg = $OK
            If BitAND(GUICtrlRead($1),$GUI_UNCHECKED) Then

            If BitAND(GUICtrlGetState($OK), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($OK, $GUI_DISABLE)

            If BitAND(GUICtrlGetState($OK), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($OK, $GUI_ENABLE)
Edited by thexshadow

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.