Context Menu - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Context Menu

sonu_1984sonu_1984 Posts: 6Member
Hey frnds i want to show context menu on drop down menu item right click...As an example,Suppose we add bookmark in mozilla & when we right click on that item..context menu is showing.
..How to do that..can somebody plz tell tell me..

[code]
Private Sub MenuAddToFavorites_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MenuAddToFavorites.MouseDown

If e.Button = Windows.Forms.MouseButtons.Right Then
'ContextMenuFavorites.Show(e.Location)
ContextMenuFavorites.Show(DirectCast(sender, ToolStripMenuItem).GetCurrentParent.PointToScreen(e.Location))
End If
End Sub
[/code]

Problem is dat when i right click,context menu is showing..& menu disappeared..But i want that menu should not be disappeared,..

Comments

  • PsightoplazmPsightoplazm Posts: 332Member ✭✭
    The menu item itself should have an "Items" collection that you can add sub-menu items to. You don't need to manually add a context menu, the menu items themselves have built-in support for this.

    ><//~Psightoplasm`~
Sign In or Register to comment.