Context Menu
-
Hi, Can someone help me with this problemo. I'm trying to get the context menu to popup only when a specific cursor is showing over the control. The control switches cursor ( default to hand and back ) when double clicked. I want the context menu only to popup when the mouse is right clicked AND when the hand cursor is showing. It works for the first time I switch to hand cursor but once I select a menuItem on contextmenu, the contextmenu pops up with both cursors there after. Thanks
-
Hi, Can someone help me with this problemo. I'm trying to get the context menu to popup only when a specific cursor is showing over the control. The control switches cursor ( default to hand and back ) when double clicked. I want the context menu only to popup when the mouse is right clicked AND when the hand cursor is showing. It works for the first time I switch to hand cursor but once I select a menuItem on contextmenu, the contextmenu pops up with both cursors there after. Thanks
hi,KEITHSTER i hope the following code snippet will help you first put a contextmenu control and a button control in the form then at the code part Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown If e.Button = MouseButtons.Right And Me.Button1.Cursor Is System.Windows.Forms.Cursors.Hand Then ContextMenu1.Show(Button1, New Point(0, 0)) End If End Sub Good luck! if it still not work,put your code here I try my best!