Context Menu - Programmers Heaven

Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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..

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(DirectCast(sender, ToolStripMenuItem).GetCurrentParent.PointToScreen(e.Location))
End If
End Sub

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


  • 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.

Sign In or Register to comment.