什么函数能调整GUI界面的尺寸?
GUICreate建立了个GUI。有没有什么函数能改变原先建立的窗口尺寸。但界面里面按钮的按钮文本框等位置最好不产生变化
[ 本帖最后由 黑菜 于 2008-12-6 21:44 编辑 ] #include <ButtonConstants.au3>
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
Opt('GUIResizeMode', 802) ;<==注意这一句
$Window = GUICreate("窗口大小改变示例", 367, 300, 192, 114)
$Button1 = GUICtrlCreateButton("Button", 262, 32, 83, 25, 0)
$Button2 = GUICtrlCreateButton("Button", 262, 68, 83, 25, 0)
$Button3 = GUICtrlCreateButton("Button", 262, 104, 83, 25, 0)
$Button4 = GUICtrlCreateButton("设置↓", 262, 140, 83, 25, 0)
$Button5 = GUICtrlCreateButton("Button", 262, 193, 83, 25, 0)
$Button6 = GUICtrlCreateButton("Button", 262, 226, 83, 25, 0)
$Button7 = GUICtrlCreateButton("Button", 262, 260, 83, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button4
$pos = WinGetPos("窗口大小改变示例","")
If GUICtrlRead($Button4) = "设置↓" Then
WinMove($Window,"", Default, Default, Default , 620);620;605
GUICtrlSetData($Button4,"设置↑")
ElseIf GUICtrlRead($Button4) = "设置↑" Then
WinMove($Window,"", Default, Default,Default , 350);350;326
GUICtrlSetData($Button4,"设置↓")
EndIf
EndSwitch
WEnd
原帖由 webhelp 于 2008-12-6 20:07 发表 http://www.autoitx.com/images/common/back.gif
#include
#include
#include
Opt('GUIResizeMode', 802) ;
谢谢,完全合我意 有方法能做成像IE那样点击后自动最大化最小化的方法么?
谢谢 除了窗口,其他例如ListView也能这样吗?
页:
[1]