#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 539, 330, -1, -1, $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX + $WS_SIZEBOX)
$Tab1 = GUICtrlCreateTab(8, 8, 513, 97)
GUICtrlSetResizing(-1, 2 + 4 + 544)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Edit1 = GUICtrlCreateEdit("", 16, 40, 489, 50)
GUICtrlSetResizing(-1, 2 + 4 + 544)
GUICtrlSetData(-1, "左上右不变,高度不变,随窗口变宽而变宽")
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
GUICtrlCreateTabItem("")
GUISetState()
$Form1_1 = GUICreate("", 540, 212, -2, 100, BitOR($WS_CHILD, $WS_TABSTOP), -1, $Form1)
$Group1 = GUICtrlCreateGroup("Group1", 8, 10, 513, 185)
GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$ListView1 = GUICtrlCreateListView("", 16, 25, 370, 158)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM)
$Edit2 = GUICtrlCreateEdit("", 392, 25, 113, 161)
GUICtrlSetData(-1, "上下右不变,随窗口##CRLF##拉宽移位,拉高而变高")
GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_RESIZED
RESIZED()
Case $GUI_EVENT_MAXIMIZE
RESIZED()
Case $GUI_EVENT_RESTORE
RESIZED()
EndSwitch
WEnd
Func RESIZED()
Local $aClientSize = WinGetClientSize($Form1)
; 主窗口客户区的高度和宽度.
WinMove($Form1_1, "", Default, Default, $aClientSize[0], $aClientSize[1] - 100)
EndFunc ;==>RESIZED