简单。 看我的代码。#include <GUIConstants.au3>
#include <WindowsConstants.au3>
dim $Form2,$Form1,$check4
Opt("GUIOnEventMode", 1)
OnAutoItExitRegister("Quit")
$Form2=GUICreate("安装选项",170,273,-1,-1)
$Form1=GUICreate ( "我的第一个窗口", 484, 273,-1,-1,BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetOnEvent($GUI_EVENT_CLOSE, "quit")
$check4=GUICtrlCreateCheckbox("安装", 20,235,50,25)
GUICtrlSetOnEvent($check4, "check4")
GUISetState (@SW_SHOW,$Form1)
While 1
Sleep(1000)
WEnd
Func check4()
Local $Form1Pos=WinGetPos($Form1)
If GUICtrlRead($check4)=$GUI_CHECKED Then
WinMove($Form2,"",$Form1Pos[0]+$Form1Pos[2],$Form1Pos[1])
GUISetState(@SW_SHOW,$Form2)
Else
GUISetState(@SW_HIDE,$Form2)
EndIf
EndFunc
Func Quit()
Exit
EndFunc
|