#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("窗体调整测试___Pcbar", 300, 200, 120, 125)
$Slider1 = GUICtrlCreateSlider(0, 8, 260, 33)
GUICtrlSetData(-1,50)
GUICtrlSetTip(-1,"拖动以改变窗体大小.")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Local $a
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
if GUICtrlRead($Slider1)<>$a Then
$a=GUICtrlRead($Slider1)
WinMove($Form1,"",Default,Default,300*(1+($a-50)/100),200*(1+($a-50)/100))
EndIf
WEnd |