#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt('GUIResizeMode', 802)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 381, 150)
$Button1 = GUICtrlCreateButton("展开", 65, 96, 251, 25)
$Group1 = GUICtrlCreateGroup("被折叠部分", 14, 128, 353, 105)
$Label1 = GUICtrlCreateLabel("折叠后,窗口高度变小,就看不到这里了!不要影响到状态栏", 38, 176, 301, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$hStatus = _GUICtrlStatusBar_Create($Form1)
$Group2 = GUICtrlCreateGroup("信息", 14, 8, 353, 73)
$Label2 = GUICtrlCreateLabel("折叠前界面", 150, 40, 64, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_SIZE, "WM_SIZE")
#EndRegion ### END Koda GUI section ###
Func WM_SIZE($hWnd, $Msg, $wParam, $lParam)
_GUICtrlStatusBar_Resize($hStatus)
Return $GUI_RUNDEFMSG
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If GUICtrlRead($Button1) = "展开" Then
WinMove ($Form1,"", Default, Default, Default , 264)
GUICtrlSetData($Button1,"折叠")
ElseIf GUICtrlRead($Button1) = "折叠" Then
WinMove ($Form1,"", Default, Default,Default , 180)
GUICtrlSetData($Button1,"展开")
EndIf
EndSwitch
WEnd
已经解决!