That works quite well Cusem. Here's a variation.
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 633, 300, 197, 123)
;--->>> Example
GroupBox(30, 30, 300, 100, 120, 26, "Group box Number 1")
GroupBox(30, 170, 300, 100, 120, 0, "Group box Number 2")
;<<<--- Example
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func GroupBox($x, $y, $w, $h, $lw = 0, $lh = 0, $lText = '') ;X-Pos, Y-Pos, Width, Height
If $lh = 0 And $lText = '' Then $lw = 0
;--->>> Top
Local $lbltoL = GUICtrlCreateLabel("", $x + 1, $y, 10 - 1, 2)
Local $lbltoR = GUICtrlCreateLabel("", $x + 10 + $lw, $y, $w - 10 - $lw, 2)
Local $lbltiL = GUICtrlCreateLabel("", $x, $y + 2, 10, 1, $WS_CLIPSIBLINGS)
Local $lbltiR = GUICtrlCreateLabel("", $x + 10 + $lw, $y + 2, $w - 2 - 10 - $lw, 1, $WS_CLIPSIBLINGS)
Local $lblrbL = GUICtrlCreateLabel("", $x + 4, $y + 4, 10 - 4, 1, $WS_CLIPSIBLINGS)
Local $lblrbR = GUICtrlCreateLabel("", $x + 10 + $lw, $y + 4, $w - 4 - 10 - $lw, 1, $WS_CLIPSIBLINGS)
GUICtrlSetBkColor($lbltoL, 0xD4D0C8)
GUICtrlSetBkColor($lbltiL, 0x808080)
GUICtrlSetBkColor($lblrbL, 0xC0C0C0)
GUICtrlSetBkColor($lbltoR, 0xD4D0C8)
GUICtrlSetBkColor($lbltiR, 0x808080)
GUICtrlSetBkColor($lblrbR, 0xC0C0C0)
;<<<--- Top
;--->>> Bottom
Local $lblbo = GUICtrlCreateLabel("", $x, $y + $h + 1, $w, 2)
Local $lblbi = GUICtrlCreateLabel("", $x + 1, $y + $h, $w - 3, 1, $WS_CLIPSIBLINGS)
Local $lblbb = GUICtrlCreateLabel("", $x + 4, $y + $h - 1, $w - 8, 1, $WS_CLIPSIBLINGS)
GUICtrlSetBkColor($lblbo, 0xA0A0A4)
GUICtrlSetBkColor($lblbi, 0xFFFFE1)
GUICtrlSetBkColor($lblbb, 0xC0C0C0)
;<<<--- Bottom
;--->>> Left
Local $lbllo = GUICtrlCreateLabel("", $x, $y, 2, $h + 2)
Local $lblli = GUICtrlCreateLabel("", $x + 2, $y + 3, 1, $h - 3)
Local $lbllb = GUICtrlCreateLabel("", $x + 4, $y + 4, 1, $h - 4, $WS_CLIPSIBLINGS)
GUICtrlSetBkColor($lbllo, 0xD4D0C8)
GUICtrlSetBkColor($lblli, 0xA0A0A4)
GUICtrlSetBkColor($lbllb, 0xC0C0C0)
;<<<--- Left
;--->>> Right
Local $lblro = GUICtrlCreateLabel("", $x + $w - 1, $y, 2, $h + 3)
Local $lblri = GUICtrlCreateLabel("", $x + $w - 2, $y + 2, 1, $h - 1)
Local $lblrb = GUICtrlCreateLabel("", $x + $w - 4, $y + 4, 1, $h - 4, $WS_CLIPSIBLINGS)
GUICtrlSetBkColor($lblro, 0xD4D0C8)
GUICtrlSetBkColor($lblri, 0x808080)
GUICtrlSetBkColor($lblrb, 0xC0C0C0)
;<<<--- Right
If $lw > 0 And $lh > 0 Then GroupBox($x + 10, $y - $lh / 2, $lw, $lh)
If $lText <> "" Then
If $lh = 0 Then $lh = 22;needs real way to decide label height here, just done to make example work
GUICtrlCreateLabel($lText, $x + 18, $y - $lh / 2 + 7)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
EndIf
EndFunc ;==>GroupBox