|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to make double click event to call and execute the mouseup event codeI 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 Put the event code in a private function, then call the function from
the doubleclick event. T techsat***@gmail.com wrote: Show quoteHide quote > >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 > > > 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?! tomb wrote: Show quoteHide quote > Put the event code in a private function, then call the function from > the doubleclick event. > > T > > techsat***@gmail.com wrote: > > > > >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 > > > > > >
How to create a report (invoice)?
File operation with user-set wildcards Drag and Drop from Outlook to Vb.net RichTextBox DirectX rendered inside a control? problem save and reading from the registry Q: deleting relations Using SQLDataSource without a control? Problems with SaveAs Database Arrays please help me |
|||||||||||||||||||||||