Solved

Autohide Menu Bar

Posted on 2004-09-26
1
279 Views
Last Modified: 2012-05-05
Does anyone have a resource or a working code that will work with VB.NET 2002 to autohide the menu bar on a form?  The most famous use of it I know of is in Windows Media Player under the menu options: View/Full Mode Options
0
Comment
Question by:teamdad
1 Comment
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 100 total points
ID: 12157550
See as far as I understand you'll need to set the visible property of the menu Items
You can do it on a Button Click like:

Private Sub CmdMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdMenu.Click
        Dim i As Integer
        Static Show As Boolean = False
        Show = Not Show
        For i = 0 To MainMenu1.MenuItems.Count - 1
            MainMenu1.MenuItems(i).Visible = Show
        Next
End Sub

This will toggle between showing the Menu Bar and Hiding it.
If you want you can put the Hide option on a Timer which activates when no menu item has focus and after a delay of a few seconds hides the menu.

To show you can put a small label on mouse over of it you can show the menu bar.

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question