Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Components & Controls > Menus & Toolbars

Menus & Toolbars Discussion of menu and toolbar components

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-17-2009, 8:12 AM
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Mar 2009
Age: 27
Posts: 16
Reputation: 14
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-18-2009, 2:20 AM
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Mar 2009
Age: 27
Posts: 16
Reputation: 14
mansi sharma is on a distinguished programming path ahead
Default SHow Context Menu on MenuItem Right click

I want to show contextMenu on Menu Item Right click..But probs is dat when i right click on menu Item,Context Menu is popping up..But menu disapper..I want that menu should not be disappered...
ExAMPLE-Suppose we add any favorite in IE,When we right click on that favorite context Menu is popping up,whether we want to delete that favorite,rename that favorite...& so on..
See in Attachment
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
Attached Images
File Type: jpg Pic.jpg (56.4 KB, 8 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 1:44 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.