Private Sub DGDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) If (DateTime.Now < MouseTime.AddMilliseconds(SystemInformation.DoubleClickTime)) Then 调用事件 End If End Sub Private Sub DgdDelegaInfo_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DgdDelegaInfo.MouseDown MouseTime = Date.Now End Sub Dim MouseTime As DateTime
wuyq11((人生如梦)) 呵呵 不还意思 我是新人 你这个是VB的 我没看懂 能不能说明一下Private Sub DGDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) If (DateTime.Now < MouseTime.AddMilliseconds(SystemInformation.DoubleClickTime)) Then 调用事件 End If End Sub Private Sub DgdDelegaInfo_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DgdDelegaInfo.MouseDown MouseTime = Date.Now End Sub Dim MouseTime As DateTime
CurrentCell属性就是你双击的单元格
我要的是双击事件双击触发事件高手帮忙吧
If (DateTime.Now < MouseTime.AddMilliseconds(SystemInformation.DoubleClickTime)) Then
调用事件
End If
End Sub
Private Sub DgdDelegaInfo_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DgdDelegaInfo.MouseDown
MouseTime = Date.Now
End Sub
Dim MouseTime As DateTime
同样是double Click事件double事件不是双击datagrid就执行的
你可以试试
当你的行定位在哪里时
你双击行的标头
或列的标头都行
引发这个事件还有就是datagrid的行与行之间的空隙也会引发
如果你要的结果是双击datagrid 的文本行
执行事件的话
那真是没有
If (DateTime.Now < MouseTime.AddMilliseconds(SystemInformation.DoubleClickTime)) Then
调用事件
End If
End Sub
Private Sub DgdDelegaInfo_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DgdDelegaInfo.MouseDown
MouseTime = Date.Now
End Sub
Dim MouseTime As DateTime