PC Review


Reply
Thread Tools Rate Thread

Disable MainMenu

 
 
=?Utf-8?B?TGkgUGFuZw==?=
Guest
Posts: n/a
 
      22nd Nov 2004
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.
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      22nd Nov 2004
"Li Pang" <(E-Mail Removed)> 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/>

 
Reply With Quote
 
=?Utf-8?B?TGkgUGFuZw==?=
Guest
Posts: n/a
 
      23rd Nov 2004
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" <(E-Mail Removed)> 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/>
>
>

 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      23rd Nov 2004
"Li Pang" <(E-Mail Removed)> 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/>

 
Reply With Quote
 
=?Utf-8?B?TGkgUGFuZw==?=
Guest
Posts: n/a
 
      24th Nov 2004
Hi Herfried K. Wagner,

It works. Thanks very much.

"Herfried K. Wagner [MVP]" wrote:

> "Li Pang" <(E-Mail Removed)> 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/>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use delegate to enable / disable mainmenu from another class AboutJAV@gmail.com Microsoft C# .NET 2 18th Jan 2007 09:08 PM
Use SIP without MainMenu Michele Microsoft Dot NET Compact Framework 0 27th Sep 2004 03:15 PM
MainMenu Sloddey Microsoft Dot NET Framework 1 27th Nov 2003 08:52 AM
Re: MainMenu Bloke at the pennine puddle Microsoft VB .NET 1 15th Sep 2003 01:04 AM
Re: MainMenu Bernie Yaeger Microsoft VB .NET 0 13th Sep 2003 03:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:45 AM.