Sign in to follow this  
Followers 0
TokeySmurf

Checkbox - help please

3 posts in this topic

Ok, I want to create a checkbox (I've done it. It works just doesn't Function) with the option of Running the Program visible or Hidden.

$hideb = GUICtrlCreateCheckbox("Hide/No Hide", 10, 80, 200, 20)

sleep(20)
    GUICtrlRead($hide)
    if $hideb = 1 Then
    WinSetState($handle, "", @SW_MINIMIZE)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Ok, I want to create a checkbox (I've done it. It works just doesn't Function) with the option of Running the Program visible or Hidden.

$hideb = GUICtrlCreateCheckbox("Hide/No Hide", 10, 80, 200, 20)

    sleep(20)
    
    if GUICtrlRead($hideb) = $GUI_CHECKED Then
         WinSetState($handle, "", @SW_MINIMIZE)
    endif
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

GUICreate("Test", 500, 500)
$checkbox = GUICtrlCreateCheckbox("Hide/Unhide", 10, 10)
While (GUIGetMsg() <> -3)
    $info = GUICtrlRead($checkbox) ;read the checkbox
    if ($info = $GUI_CHECKED) Then ;check if its checked
        GUISetState(@SW_MINIMIZE) ;set the window state
    Else
        GUISetState()
    EndIf
WEnd

Hopefully that helps you out :)

Edited by CHRIS95219

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