GUICtrlCreateInput 的双击事件怎么写..
论坛上找不到..只有ListView的双击... #include <GUIConstantsEx.au3>#include <WindowsConstants.au3>
$Form1= GUICreate("双击Input控件示例", 346, 64, 192, 124)
$Input = GUICtrlCreateInput("", 24, 16, 289, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_PRIMARYUP
$CursorInfo = GUIGetCursorInfo()
If $CursorInfo = 3 Then GUICtrlSetData($Input, "你双击Input控件!")
EndSwitch
WEnd
谢谢..不过我要的是双击事件..你的是单击 本帖最后由 lynfr8 于 2011-3-13 23:00 编辑
回复 3# 阿米啦啦
确实,没认真测试就贴上来了
修改后:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Local $N = False, $T0, $T1, $I
$Form1 = GUICreate("双击Input控件示例.au3", 346, 64, 192, 124)
$Input = GUICtrlCreateInput("", 24, 16, 289, 21)
GUISetState(@SW_SHOW)
$T0 = TimerInit()
While 1
$T1 = TimerDiff($T0)
If $T1 > 300 And $N = True Then
$N = False
$T0 = TimerInit()
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_PRIMARYUP
$CursorInfo = GUIGetCursorInfo()
If $CursorInfo = 3 Then
If $N = False Then
$N = True
$T0 = TimerInit()
Else
$N = False
$I = $I + 1
GUICtrlSetData($Input, "产生双击,第" & $I & "次")
EndIf
EndIf
EndSwitch
WEnd
谢谢楼上高手, 真是高手。我也学习一下,谢谢 这下好了 单击双击都有了 good example.果然是高手..... GUICtrlCreateInpu
单击 双击 有关部门支持楼主!
http://www.99doudou.cn/sigline.gif
最有效的减肥药怎么能快速减肥
页:
[1]