以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]listview求助  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=86312)

--  作者:jiskin
--  发布时间:2016/6/15 10:47:00
--  [求助]listview求助
为什么listview的双击事件不起作用?
如何在listview空白处双击触发?
求教

--  作者:大红袍
--  发布时间:2016/6/15 10:58:00
--  

 mouseDown事件

 

static ptime As Date = Nothing

Dim sp As TimeSpan = Date.now - ptime
If sp.TotalSeconds <= 0.2 Then
    msgbox("双击了")
Else
    ptime = Date.now
End If


--  作者:jiskin
--  发布时间:2016/6/15 11:03:00
--  
If e.Sender.Current Is Nothing Then
    static ptime As Date = Nothing
    Dim sp As TimeSpan = Date.now - ptime
    If sp.TotalSeconds <= 0.2 Then
        msgbox("双击了")
    Else
        ptime = Date.now
    End If
End If

加了个条件 好了 谢谢
[此贴子已经被作者于2016/6/15 11:03:41编辑过]