以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请教:如何判断是否双击了空格键?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=73611)

--  作者:y2287958
--  发布时间:2015/8/23 7:26:00
--  请教:如何判断是否双击了空格键?
如题
--  作者:大红袍
--  发布时间:2015/8/23 10:09:00
--  

KeyDown事件

 

static ptime As Date = Nothing

Dim sp As TimeSpan = Date.now - ptime
If sp.TotalMilliseconds < 500 Then
    msgbox("双击了") 
End If
ptime = Date.now
e.cancel = True


--  作者:y2287958
--  发布时间:2015/8/23 13:14:00
--  
谢谢