Jump to content
Sign in to follow this  

Hangman Grid

Recommended Posts


I am not on my computer and am leaving this here so I can access it later and when I finally finish the hangman game ill update this post.

This does give a example of how to use a loop to save you time instead of having to write the same thing out 50 times ^_^

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $Letter[14]

GUICreate("Hang", 650, 600)

$LabelLeft = 0 
For $i = 1 To 13 Step +1
    $Letter[$i] = GUICtrlCreateLabel("A", $LabelLeft, 0, 50, 50)
    $LabelLeft+= 50
    GUICtrlSetFont($Letter[$i] , 24, 400, 0, "MS Sans Serif")
    GUICtrlSetColor($Letter[$i], 0xFF0000)
    ;GUICtrlSetBkColor($Letter[$i], 0x000000)

$ButtonLeft = 0
For $i = 65 To 90 Step +1
    GUICtrlCreateButton(Chr($i) , $ButtonLeft , 600 - 20 , 25 , 20)
    $ButtonLeft+= 25


While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE

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.