#include "GuiCtrlFrame.au3"

$hGui = GUICreate('Test Frame-Ctrl')

$in_1 = GUICtrlCreateInput('Input_1', 15, 15, 80, 20)
$mFrame_1 = _GuiCtrlFrame_Create()  ; as default, the last created ctrl-ID will used for size and position

$in_2 = GUICtrlCreateInput('Input_2', 120, 15, 80, 20)
$mFrame_2 = _GuiCtrlFrame_Create(-1, -1, 120, 15, 80, 20)   ; with default color and thickness around the passed parameters
                                                            ; because this are the parameters from $in2, the frame will create around this

$in_3 = GUICtrlCreateInput('Input_3', 15, 50, 80, 20)
$in_4 = GUICtrlCreateInput('Input_4', 120, 50, 80, 20)

$mFrame_3 = _GuiCtrlFrame_Create(4, 0x00FA00, $in_3)    ; with a specific color and thickness, assigned to a specific ctrl

$btChangeCol = GUICtrlCreateButton('Switch Input_1 to .colorMsg', 15, 100, 150, 20)
$btSwitchBack = GUICtrlCreateButton('Switch Input_1 back to .color', 170, 100, 150, 20)
$btSetCol = GUICtrlCreateButton('Set and activate Input_1 new .colorMsg', 15, 125, 200, 20)
$btMove = GUICtrlCreateButton('Move Frame from Input_3 to Input_4', 15, 155, 200, 20)
$btHide = GUICtrlCreateButton('Hide/Show Frame on Input_2', 15, 185, 200, 20)
$btThick = GUICtrlCreateButton('Set Thickness to 4 on Input_1', 15, 215, 200, 20)
$btDel = GUICtrlCreateButton('Delete Frame on Input_1', 15, 245, 200, 20)

GUISetState()

Local $bSwitch = False

While True
    Switch GUIGetMsg()
        Case -3
            Exit
        Case $btChangeCol
            _GuiCtrlFrame_SetColor($mFrame_1)   ; switch to default stored .colorMsg
        Case $btSwitchBack
            _GuiCtrlFrame_SetColor($mFrame_1, Null)   ; switch back to color from creation
        Case $btSetCol
            _GuiCtrlFrame_SetColor($mFrame_1, 0xFAFA00)
        Case $btMove
            _GuiCtrlFrame_AssignID($mFrame_3, $in_4)
        Case $btHide
            _GuiCtrlFrame_Show($mFrame_2, $bSwitch)
            $bSwitch = Not $bSwitch
        Case $btThick
            _GuiCtrlFrame_SetThickness($mFrame_1, 4)
        Case $btDel
            _GuiCtrlFrame_AssignID($mFrame_1)
    EndSwitch
WEnd