3#分析的不错,代码贴下。
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
Dim $input, $c2 = 1, $tb, $inputlei
GUICreate("主界面", 300, 400)
$c1 = GUICtrlCreateButton("创建含有input的新界面", 5, 100, 200, 100)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $c1
$tb = GUICreate("新界面", 500, 700)
$c2 = GUICtrlCreateButton("判断", 5, 110, 50, 50)
$inputlei = GUICtrlCreateInput("", 10, 45, 330, 30)
GUISetState()
Case $c2
If Not GUICtrlRead($inputlei) Then
MsgBox(16, "错误", "您尚未输入Input")
Else
MsgBox(0, "", GUICtrlRead($inputlei))
EndIf
EndSwitch
WEnd
|