2013-08-02 129 views

回答

2

你應該開始對鼠標按下事件的定時器,阻止它在鼠標擡起事件,並得出結論,你:)

嚼嚼:

Private ClickTime As DateTime 

Private Sub DataGridView1_MouseDown(sender As Object, e As MouseEventArgs) Handles DataGridView1.MouseDown 
    ClickTime = Now 
End Sub 

Private Sub DataGridView1_MouseUp(sender As Object, e As MouseEventArgs) Handles DataGridView1.MouseUp 
    If (Now - ClickTime).TotalMilliseconds > 500 Then MsgBox("LongClick") 
End Sub 
+0

輝煌解決方法..謝謝:) –