楼主贴些代码出来才好分析嘛#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1) ; 切换到 OnEvent 模式
$Form1 = GUICreate("Form1", 300, 200)
GUISetOnEvent($GUI_EVENT_CLOSE, "GUI")
$Checkbox = GUICtrlCreateCheckbox("点击", 48, 56, 97, 17)
GUICtrlSetOnEvent(-1, "GUI")
$Label1 = GUICtrlCreateLabel("选择的子项目:", 150, 40, 88, 60)
$Form2 = GUICreate("Form1", 208, 203)
GUISetOnEvent($GUI_EVENT_CLOSE, "GUI")
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 32, 40, 97, 17)
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 32, 80, 97, 17)
$Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 32, 120, 97, 17)
Local $t = "选择的子项目:"
GUISetState(@SW_SHOW, $Form1)
While 1
WEnd
Func GUI()
Switch @GUI_CtrlId
Case $GUI_EVENT_CLOSE
If @GUI_WINHANDLE = $Form1 Then
Exit
ElseIf @GUI_WINHANDLE = $Form2 Then
If GUICtrlRead($Checkbox1) = 1 Then $t &= @CRLF & "Checkbox1"
If GUICtrlRead($Checkbox2) = 1 Then $t &= @CRLF & "Checkbox2"
If GUICtrlRead($Checkbox3) = 1 Then $t &= @CRLF & "Checkbox3"
GUICtrlSetData($Label1, $t)
GUISwitch($Form1)
GUISetState(@SW_HIDE, $Form2)
EndIf
Case $Checkbox
If GUICtrlRead($Checkbox) = 1 Then GUISetState(@SW_SHOW, $Form2)
EndSwitch
EndFunc
|