|
发表于 2008-6-13 00:45:10
|
显示全部楼层
我只能用系统消息来完成。希望能有更多方法.
[au3]#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$WM_LBUTTONDOWN=0x0201
$Form1 = GUICreate("Form1", 300, 153, -1,-1,$WS_CLIPSIBLINGS)
GUIRegisterMsg ($WM_LBUTTONDOWN, "WM_LBUTTONDOWN" )
GUIRegisterMsg ($WM_KEYDOWN, "WM_KEYDOWN" )
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func WM_LBUTTONDOWN($hWndGUI, $MsgID, $WParam, $LParam)
TrayTip("新鼠标事件","产生时间:" &@HOUR&":"&@MIN&":"&@SEC & @CRLF & $hWndGUI & " - " & $MsgID & " - " & $WParam & " - " & $LParam ,10)
Return 1
EndFunc
Func WM_KEYDOWN($hWndGUI, $MsgID, $WParam, $LParam)
TrayTip("新键盘事件","产生时间:" &@HOUR&":"&@MIN&":"&@SEC & @CRLF & $hWndGUI & " - " & $MsgID & " - " & $WParam & " - " & $LParam ,10)
Return 1
EndFunc[/au3] |
|