473,386 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Disable MainMenu

Hi,

I used MID forms, when a menu is called, I don't want any menus will be
called until the current one is completed. I'd like to know the way to
"disable" MainMenu. I don't want to use Me.Enabled = false, bucause it makes
a drawback on the child form.

Anyone knows that? Thanks in advance.
Nov 21 '05 #1
4 1216
"Li Pang" <Li****@discussions.microsoft.com> schrieb:
I used MID forms, when a menu is called, I don't want any menus will be
called until the current one is completed. I'd like to know the way to
"disable" MainMenu. I don't want to use Me.Enabled = false, bucause it
makes
a drawback on the child form.


\\\
Me.Menu = Nothing
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2
Hi Herfried K. Wagner,

Me.Menu = Nothing disappear the menu, but I only want to disable the menu
because I still want to use the menu after disable it.

"Herfried K. Wagner [MVP]" wrote:
"Li Pang" <Li****@discussions.microsoft.com> schrieb:
I used MID forms, when a menu is called, I don't want any menus will be
called until the current one is completed. I'd like to know the way to
"disable" MainMenu. I don't want to use Me.Enabled = false, bucause it
makes
a drawback on the child form.


\\\
Me.Menu = Nothing
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
"Li Pang" <Li****@discussions.microsoft.com> schrieb:
Me.Menu = Nothing disappear the menu, but I only want to disable the menu
because I still want to use the menu after disable it.


You can use it by reassigning the mainmenu to the 'Menu' property. If you
only want to disable the menu, take a look at this procedure:

\\\
Private Sub EnableMenu(ByVal Enabled As Boolean)
For Each mi As MenuItem In Me.Menu.MenuItems
mi.Enabled = Enabled
Next mi
End Sub
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4
Hi Herfried K. Wagner,

It works. Thanks very much.

"Herfried K. Wagner [MVP]" wrote:
"Li Pang" <Li****@discussions.microsoft.com> schrieb:
Me.Menu = Nothing disappear the menu, but I only want to disable the menu
because I still want to use the menu after disable it.


You can use it by reassigning the mainmenu to the 'Menu' property. If you
only want to disable the menu, take a look at this procedure:

\\\
Private Sub EnableMenu(ByVal Enabled As Boolean)
For Each mi As MenuItem In Me.Menu.MenuItems
mi.Enabled = Enabled
Next mi
End Sub
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anand Ganesh | last post by:
Hi All, I am trying to create a control - .dll file. In the toolbox the MainMenu tool is disabled. What should I do to invoke it? Why is it disbaled?
0
by: Marcel | last post by:
Hi, the application I am writing has a MainMenu and a DataGrid (UltraGrid). Now I have to edit the text of each cell in this grid. So far so good. All works fine in editmode but if I press a...
5
by: Brian Henry | last post by:
I have a form with a main menu on it (mdi parent form) and i have a child form with a menu and I am mergeing the menus together for the menu called reports.. now when i do this they merge just...
2
by: polocar | last post by:
Hi, I'm writing a program using Visual C# 2005 Professional Edition, and I was trying to assign multiple MainMenu objects (one by one, of course) to the same Form (let's suppose 2 MainMenu...
0
by: dave091277 | last post by:
Hi, I have an application with a mdiParent and a mdiChild. I have a mainmenu item on each but when I open the child form the menu merges with the parent. Is there any way to stop this?? I need...
1
by: dave091277 | last post by:
Hi, I have an application with a mdiParent and a mdiChild. I have a mainmenu item on each but when I open the child form the menu merges with the parent. Is there any way to stop this?? I need...
2
by: AboutJAV | last post by:
I created a mainmenu in the form class. I added the following code public delegate void ChangeMainMenuDelegate(bool bState); public void ChangeMainMenuState(bool bState) { for (int n = 0; n <...
1
by: Benson | last post by:
I have a MainMenu (MenuStrip) which will be loaded (dynamic by codes) after the program Login form. The first time run is ok. But when I close the MainMenu and go back to Login form, and then go to...
2
by: Academia | last post by:
In an old project I still use MainMenu and ContexMenu. How can I get them to appear in my Toolbox? Thanks
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.