Jump to content

Checkbox - help please


Recommended Posts

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)
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...