Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Debug me...
  • 11 months later...
Posted (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 by SonicBoomAu

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

Posted
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.

Debug me...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...