View Single Post
  #1 (permalink)  
Old 06-17-2009, 7:12 AM
mansi sharma mansi sharma is offline
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Mar 2009
Age: 27
Posts: 16
Reputation: 15
mansi sharma is on a distinguished programming path ahead
Default MenuItem + ContextMenu

I want to show the contextMenu on MenuItem right click....AS IE favorites....
I m able to show the contextMenu when i right click on menu..But the Probs is dat when i right click..Context menu is showing & menu is hidding.......
Y so ..I want that when we right clikc on menu..Menu is not hidden..How to do dat..

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