*Experts* DiverDan Posted February 14, 2003 *Experts* Posted February 14, 2003 I've just finished some very nice looking owner drawn menus and context menus. The context menus are displayed only in designated TextBoxes (user input boxes) that I specified at design time. When I ran the program all worked very well except that...the VB default context menu still worked in the non designated TextBoxes. How can I stop the default context menu in these boxes and still maintain my owner drawn context menus? Thanks Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Moderators Robby Posted February 14, 2003 Moderators Posted February 14, 2003 When you assign your context menu to the textbox it should override the default one. Quote Visit...Bassic Software
*Experts* DiverDan Posted February 14, 2003 Author *Experts* Posted February 14, 2003 Hi Robby, Yes, it does very well. However, it is the other (non-designated)textboxes that I would like to prevent the default context menu from displaying. In other words prevent any and all context menus from poping up over specific textboxes. Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
*Gurus* divil Posted February 14, 2003 *Gurus* Posted February 14, 2003 You can override the default contextmenu by setting the ContextMenu property to a new, blank instance of the ContextMenu class: TextBox1.ContextMenu = New ContextMenu() Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
*Experts* DiverDan Posted February 14, 2003 Author *Experts* Posted February 14, 2003 Thanks Divil Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.