.NET General

Moderators: None (Apply to moderate this forum)
Number of threads: 797
Number of posts: 1359

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Context Menu Posted by sonu_1984 on 22 Jun 2009 at 10:20 AM
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(e.Location)
            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,..
Report
Re: Context Menu Posted by Psightoplazm on 2 Jul 2009 at 2:05 PM
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`~



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.