Malfunction Posted December 9, 2003 Posted December 9, 2003 Hi there...... I have a menufunction that switches my app to fullscreen mode.* The user can edit a sheet (panel) and preview it in that mode. The panel gets resized to fullscreen and everything else hase to disappear. I use this.FormBorderStyle = FormBorderStyle.None; this.WindowState = FormWindowState.Maximized; to maximize my app and toolBar1.Visible = false; to hide the toolbar but how can I hide the mainmenu? It has no visible property and this.menu = void or null doesn't work either. Any ideas? tHx * Just like Powerpoint where you can edit a page and preview it in fullscreen. Quote Debug me...
Mehyar Posted December 9, 2003 Posted December 9, 2003 To hide a menu, hide its MenuItems .... Quote Dream as if you'll live forever, live as if you'll die today
*Gurus* divil Posted December 9, 2003 *Gurus* Posted December 9, 2003 this.Menu = null; That works. 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
Voca Posted December 9, 2003 Posted December 9, 2003 OK, took me too much time typing... :D My solution would have been more difficult btw. Voca Quote
angus234 Posted November 10, 2004 Posted November 10, 2004 this.Menu = null; That works. after hiding the Menu, How to make the menu appears again? this.Menu = new Menu(); <- it doesn't work Thank you. Quote
SonicBoomAu Posted November 11, 2004 Posted November 11, 2004 (edited) Why not just set all the top menuitems visible property to false me.MenuItem1.visible = false and when you want to display it again me.MenuItem1.visible = true Edited November 11, 2004 by SonicBoomAu Quote Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled
Malfunction Posted November 16, 2004 Author Posted November 16, 2004 after hiding the Menu, How to make the menu appears again? this.Menu = new Menu(); <- it doesn't work Thank you. You're creating a whole new menu without any menuitems. Somewhere in your form you (or the designer) declared a variable probably called mainMenu1 that holds a reference to the menu. this.Menu = null removes the menu from the form but the reference is still kept by the variable mainMenu1. So this.Menu = thismainMenu1; should work. Quote Debug me...
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.