
Приветствую всех. В форме есть чекбокс .При выделении чекбокса высота формы должно уменьшатся до позволенного и перекрывать контролы (спрятать их).При этом все элементы которые на форме не должны изменять свои места расположения (Left и Top ) .А при снятии выделении чекбокса все поставить на свои места обратно.

Вот код формы для теста
Код:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Local $Form1,$Checkbox1,$Button1,$Button2,$Button3,$Button4,$lLabel,$Input1,$Group1
; w h l t
$Form1 = GUICreate("Form1 1", 189, 202, 192, 114)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 11, 10, 65, 17)
$Button1 = GUICtrlCreateButton("OK", 104, 10, 76, 17)
$Group1 = GUICtrlCreateGroup("Group1", 8, 42, 171, 121)
$Button2 = GUICtrlCreateButton("Button2", 19, 138, 60, 17)
$Button3 = GUICtrlCreateButton("Button3", 104, 138, 65, 17)
$Label1 = GUICtrlCreateLabel("Label1", 16, 66, 36, 17)
$Input1 = GUICtrlCreateInput("Input1", 16, 90, 152, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button4 = GUICtrlCreateButton("Exit", 109, 178, 65, 17)
GUISetState(@SW_SHOW, $Form1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE , $Button1, $Button4
Exit
Case $Checkbox1
If BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) Then
WinMove($Form1,"Form1",192,114,189,52)
Else
WinMove($Form1,"Form1",192,114,189,202)
EndIf
EndSwitch
WEnd