How do I have a pop-up menu after i've clicked a button with the left mousebutton?
I imagine its a ContextMenu, but how do I show it?
Printable View
How do I have a pop-up menu after i've clicked a button with the left mousebutton?
I imagine its a ContextMenu, but how do I show it?
Ok, i've managed to figure out this:
but the menu is showing about 2 inches below where i've clicked the mouse on the button.VB Code:
SearchContextMenu.Show(Me, btnSearchMenu.MousePosition)
How do I get it so its just below and to the right, like a normal context menu?
VB Code:
Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown If e.Button = MouseButtons.Left Then Dim pp As Point = New Point(e.X, e.Y) ContextMenu1.Show(Button1, pp) End If End Sub
Thanks :)