如何检测用户按下了按钮?
本帖最后由 faceyao 于 2009-6-30 14:25 编辑比如按下了按钮1,如何才能检测到? 想怎么样?是以文本的形式将此动作纪录下来,还是有个响应事件?请说清楚! #include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 227, 59, 192, 124)
$Button1 = GUICtrlCreateButton("确定", 16, 16, 75, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("取消", 112, 16, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MsgBox (0,"","你点击了【确定】按钮")
Case $Button2
MsgBox (0,"","你点击了【取消】按钮")
EndSwitch
WEnd
谢谢楼上,已解决
页:
[1]