How to make double click event to call and execute the mouseup event code

A

Anon

Hi,

I want the double click event to call(here not able to get the
MouseEventArgs) and execute the mouseup event code or any one tell me
how to make my treecontrol double click nodes to behave like a singe
click event(that is mouseup here)so that that will fire mouseup.How can
i implement this?any ideas ? code snippets?

Thanks in advance
satish

Here is the code.Consider these event handing code are inside a
usercontrol class.The tree control used here is infragistics tree
control.


Public Class ucNavigationTree
Inherits System.Windows.Forms.UserControl

Private Sub TreeView1_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles TreeView1.MouseUp
Dim pt As New Point(e.X, e.Y)
Dim clickedCtrl As TreeNode = TreeView1.GetNodeAt(pt)

If clickedCtrl Is Nothing OrElse clickedCtrl.Tag Is Nothing
Then Exit Sub

TreeView1.SelectedNode = TreeView1.GetNodeAt(New Point(e.X,
e.Y))

Try

If e.Button = MouseButtons.Left Then
Cursor.Current = Cursors.AppStarting
ActivateViewer(TreeView1.SelectedNode, False)

ElseIf e.Button = MouseButtons.Right Then
Dim mnu As ContextMenu
' display popup from attached tag
If TypeOf clickedCtrl.Tag Is
UserManagementDataSet.entitiesRow Then
mnu = MenuOpenOption
If Not mnu Is Nothing Then mnu.Show(TreeView1,
pt)
End If
End If

Finally
Cursor.Current = Cursors.Default
End Try
Debug.WriteLine("The Count is :" + counter.ToString)
End Sub


Private Sub TreeView1_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TreeView1.DoubleClick

End Sub

End Class
 
T

tomb

Put the event code in a private function, then call the function from
the doubleclick event.

T
 
T

Techsatish

But how will pass my mouse cursor postion and the mouse event args to
the double click event...argument for double click has System.EventArgs
which does to accept this?!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top