#Include <GUIConstantsEx.au3>
#Include <GUIMenu.au3>
#Include <GUIListBox.au3>
#Include <WinAPIEx.au3>
$hForm = GUICreate('MyGUI', 310, 360)
GUISetFont(8.5, 400, 0, 'MS Shell Dlg', $hForm)
_GUICtrlListBox_Create($hForm, "List", 20, 150, 270, 170)
GUICtrlCreateGroup('Group', 10, 10, 140, 95)
GUICtrlCreateCheckbox('Check1', 22, 26, 120, 23)
GUICtrlCreateCheckbox('Check2', 22, 49, 120, 23)
GUICtrlCreateCheckbox('Check3', 22, 72, 120, 23)
GUICtrlCreateGroup('Group', 160, 10, 140, 95)
GUICtrlCreateRadio('Radio1', 172, 26, 120, 23)
GUICtrlCreateRadio('Radio2', 172, 49, 120, 23)
GUICtrlCreateRadio('Radio3', 172, 72, 120, 23)
$Button = GUICtrlCreateButton('Lock', 120, 330, 70, 23)
GUICtrlCreateTab(10, 118, 292, 206)
GUICtrlCreateTabItem('Tab1')
GUICtrlCreateTabItem('Tab2')
GUICtrlCreateTabItem('')
GUISetState()
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button
_GUILock($hForm, 1)
Sleep(5000)
_GUILock($hForm, 0)
EndSwitch
WEnd
Func _GUILock($hWnd, $fLock)
Local $Data, $State
If $fLock Then
GUISetCursor(15, 1, $hWnd)
$State = "Disable"
Else
GUISetCursor(2, 1, $hWnd)
$State = "Enable"
EndIf
_GUICtrlMenu_EnableMenuItem(_GUICtrlMenu_GetSystemMenu($hWnd), $SC_CLOSE, $fLock, 0)
$Data = _WinAPI_EnumChildWindows($hWnd)
If IsArray($Data) Then
For $i = 1 To $Data[0][0]
Execute('Control' & $State & '($Data[$i][0], "", "")')
Next
EndIf
EndFunc