(已解决)有没办法让子窗体跟随父窗体的大小的改变而改变?
本帖最后由 awfymwvf 于 2011-5-16 08:38 编辑#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") ; 设置窗口关闭事件
$Item_GUI2 = GUICreate("", 528, 301, 0, 0, $WS_CHILD ,"",$Form1)
GUISetBkColor(0x333333)
GUISetState()
While 1
Sleep(1000)
WEnd要让子窗体实时的跟随主窗体大小的改变而改变,谢谢大侠们了。
谢谢蛋哥和PCBAR版 设置$GUI_EVENT_RESIZED事件
不建议这样的编程思路 #include <GUIConstantsEx.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 ()
$Button1 = GUICtrlCreateButton("退出程序", 406, 206, 80,30)
GUICtrlSetOnEvent($Button1, "Button1")
;GUICtrlSetOnEvent($check1, "check1")
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ; 设置窗口关闭事件
$Item_GUI2 = GUICreate("", 528, 301, 0, 0, BitOR($WS_EX_DLGMODALFRAME, $WS_EX_TOPMOST),$Form1)
GUISetBkColor(0x333333)
GUISetState()
While 1
Sleep(1000)
WEnd 设置$GUI_EVENT_RESIZED事件
不建议这样的编程思路
pcbar 发表于 2011-5-13 15:55 http://www.autoitx.com/images/common/back.gif
他那个子窗体貌似只是为了加底色,用消息有些大材小用了 谢谢蛋蛋和超版。我最后用了蛋哥的代码,和蛋哥学了好多啊
页:
[1]