(已解决)对于可缩放的窗体,里面控件的位置如何控制?
本帖最后由 awfymwvf 于 2011-5-10 09:18 编辑#include <GUIConstants.au3>
#include <GUIListView.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
dim $dll,$Button1,$hPic1,$hPic2,$Tu1=0,$Tu2=0,$check1
Opt("GUIOnEventMode", 1)
;OnAutoItExitRegister("Quit")
Func Button1()
AdlibUnRegister()
Exit
EndFunc
Func CLOSEClicked()
AdlibUnRegister()
Exit
EndFunc
$Form1=GUICreate ( "MYFROM", 484, 302,-1,-1,BitOR($WS_SIZEBOX,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX))
$check1=GUICtrlCreateCheckbox("列表",28,200,58,58)
GUISetState (@SW_SHOW,$Form1)
$Button1 = GUICtrlCreateButton("退出程序", 406, 206, 80,30)
GUICtrlSetOnEvent($Button1, "Button1")
;GUICtrlSetOnEvent($check1, "check1")
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ; 设置窗口关闭事件
While 1
Sleep(1000)
WEnd里面的控件的位置怎么控制呢?比如让按钮始终离下边距10,要怎么做到呢,
不控制的话,控件的位置在窗体大小改变后,会乱了。。。
谢谢3M #include <GUIConstants.au3>
#include <GUIListView.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
dim $dll,$Button1,$hPic1,$hPic2,$Tu1=0,$Tu2=0,$check1
Opt("GUIOnEventMode", 1)
;OnAutoItExitRegister("Quit")
Func Button1()
AdlibUnRegister()
Exit
EndFunc
Func CLOSEClicked()
AdlibUnRegister()
Exit
EndFunc
$Form1=GUICreate ( "MYFROM", 484, 302,-1,-1,BitOR($WS_SIZEBOX,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX))
$check1=GUICtrlCreateCheckbox("列表",28,200,58,58)
GUISetState (@SW_SHOW,$Form1)
$Button1 = GUICtrlCreateButton("退出程序", 406, 206, 80,30)
GUICtrlSetOnEvent($Button1, "Button1")
GUICtrlSetResizing(-1,512+256+64)
;GUICtrlSetOnEvent($check1, "check1")
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ; 设置窗口关闭事件
GUICtrlSetResizing(-1,512+256+64)
While 1
Sleep(1000)
WEnd 看了一下,运行效果没有什么变化呀,看不出效果。
页:
[1]