本帖最后由 xwt620 于 2009-12-3 23:07 编辑
RT,如何修改下面的代码?Opt("GUIOnEventMode", 1)
$Form1_1 = GUICreate("form1", 292, 150, @DesktopWidth / 3, @DesktopHeight / 3)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
$Input1 = GUICtrlCreateInput("请输入内容", 72, 40, 153, 21)
GUICtrlSetOnEvent(-1, "on_event")
GUISetState(@SW_SHOW)
While 1
Sleep(1000)
WEnd
Func on_event()
Switch @GUI_CtrlId
Case $Input1
GUICtrlSetData($Input1, "" , "")
EndSwitch
EndFunc ;==>on_event
Func _Exit()
$iAnswer = MsgBox(4 + 256 + 32, "确认", "退出吗?")
Select
Case $iAnswer = 6 ;OK
Exit 0
Case $iAnswer = 7 ;Cancel
EndSelect
EndFunc ;==>_Exit
|