Jump to content
Sign in to follow this  
thexshadow

Button flicker

Recommended Posts

thexshadow

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)
GUICtrlSetState($OK, $GUI_DISABLE)


bla bla bla

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

Share this post


Link to post
Share on other sites
thexshadow

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)
                
            Else

            If BitAND(GUICtrlGetState($OK), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($OK, $GUI_ENABLE)
                
            EndIf
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.