Sign in to follow this  
Followers 0
fusor

Stop Flicker !

6 posts in this topic

Hi all,

Just a little help please for stop input box flicking.

have a solution ?

#include <GUIConstants.au3>

$gui = GUICreate ( "GUI input hide", 200,200,800,200)
$input=GUICtrlCreateinput ("1953/04/25", 10,10,185,20 )
$box=GUICtrlCreateCheckbox("hide InputBox", 50,50,200,20 )
GUISetState ()

While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = BitAND(GUICtrlRead($box), $GUI_UNCHECKED)
            GUICtrlSetState($Input,$GUI_ENABLE)
        Case $msg = BitAND(GUICtrlRead($box), $GUI_CHECKED)
            GUICtrlSetState($input,$GUI_DISABLE)
    EndSelect
WEnd

Share this post


Link to post
Share on other sites



This works:

#include <GUIConstants.au3>

$gui = GUICreate ( "GUI input hide", 200,200,800,200)
$input=GUICtrlCreateinput ("1953/04/25", 10,10,185,20 )
$box=GUICtrlCreateCheckbox("hide InputBox", 50,50,200,20 )
GUISetState ()

While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $box
            If BitAND(GUICtrlRead($box), $GUI_UNCHECKED) Then
                GUICtrlSetState($Input,$GUI_ENABLE)
            Else
                GUICtrlSetState($input,$GUI_DISABLE)
            EndIf
    EndSelect
WEnd

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

exactly the same problem for me, sorry another idea?

PS: I'am AutoIT 3.2.2

Edited by fusor

Share this post


Link to post
Share on other sites

The one I've posted didn't flicker on my computer but anyway - here is the same script but OnEventMode - this doesn't flicker also.

#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)
$gui = GUICreate ( "GUI input hide", 200,200,800,200)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
$input=GUICtrlCreateinput ("1953/04/25", 10,10,185,20 )
$box=GUICtrlCreateCheckbox("hide InputBox", 50,50,200,20 )
GUICtrlSetOnEvent(-1, "hideinput")
GUISetState ()

While 1
   Sleep(100) 
WEnd

Func hideinput()
    If BitAND(GUICtrlRead($box), $GUI_UNCHECKED) Then
            GUICtrlSetState($Input,$GUI_ENABLE)
        Else
            GUICtrlSetState($input,$GUI_DISABLE)
        EndIf
EndFunc

Func Close()
    Exit
EndFunc

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

$gui = GUICreate ( "GUI input hide", 200,200,800,200)
$input=GUICtrlCreateinput ("1953/04/25", 10,10,185,20 )
$box=GUICtrlCreateCheckbox("hide InputBox", 50,50,200,20 )
GUISetState ()

While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $box
            If GUICtrlRead($box) = $GUI_UNCHECKED Then
                GUICtrlSetState($Input,$GUI_ENABLE)
            ElseIf GUICtrlRead($box) = $GUI_CHECKED Then
                GUICtrlSetState($input,$GUI_DISABLE)
            EndIf
    EndSelect
WEnd

Share this post


Link to post
Share on other sites

The one I've posted didn't flicker on my computer but anyway - here is the same script but OnEventMode - this doesn't flicker also.

#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)
$gui = GUICreate ( "GUI input hide", 200,200,800,200)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
$input=GUICtrlCreateinput ("1953/04/25", 10,10,185,20 )
$box=GUICtrlCreateCheckbox("hide InputBox", 50,50,200,20 )
GUICtrlSetOnEvent(-1, "hideinput")
GUISetState ()

While 1
   Sleep(100) 
WEnd

Func hideinput()
    If BitAND(GUICtrlRead($box), $GUI_UNCHECKED) Then
            GUICtrlSetState($Input,$GUI_ENABLE)
        Else
            GUICtrlSetState($input,$GUI_DISABLE)
        EndIf
EndFunc

Func Close()
    Exit
EndFuncoÝ÷ Ûú®¢×ªº^©

Many Thanks for your help, enaiman & smashly It's working fine. i searched 3 days for this :)

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  
Followers 0