给你一个上下伸缩的:
#NoTrayIcon
#AutoIt3Wrapper_UseX64=n
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIExtender.au3>
$Form1_1 = GUICreate("伸缩窗口", 280, 430)
_GUIExtender_Init($Form1_1)
$Button1 = GUICtrlCreateButton("开始", 180, 155, 75, 33)
$Button2 = GUICtrlCreateButton("配置", 30, 155, 75, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
;------------------第二个窗体----------------
$iInput_Section = _GUIExtender_Section_Start(200, 220)
$Label24 = GUICtrlCreateLabel('- by Subp', 225, 417, 56, 12)
GUICtrlSetColor(-1, 0xC0C0C0)
_GUIExtender_Section_Extend(1, False)
GUISetState(@SW_SHOW,$Form1_1)
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetState($Button2, $GUI_DISABLE)
_GUIExtender_Section_End()
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlSetState($Button2, $GUI_ENABLE)
While 1
$iMsg = GUIGetMsg()
Switch $iMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
Switch _GUIExtender_Section_State($iInput_Section)
Case 0
GUICtrlSetData($Button2,'保存')
GUICtrlSetState($Button1, $GUI_DISABLE)
_GUIExtender_Section_Extend($iInput_Section)
Case Else
GUICtrlSetData($Button2,'配置')
GUICtrlSetState($Button1, $GUI_ENABLE)
_GUIExtender_Section_Extend($iInput_Section, False)
EndSwitch
Case $Button1
EndSwitch
_GUIExtender_Action($iMsg)
WEnd
|