disabling all menu and its sub menus

hi all,

how to disable entire  menu and its sub menus.

i tried the following code it gets the Menu ID but is not disabling the menu 
items.
HMENU hMenu;

HWND hwnd = GetSafeHwnd();


hMenu = ::GetMenu(hwnd);

int nCount=GetMenuItemCount(hMenu);

for (int i=0;i<nCount;i++)

{

//get the sub menu



HMENU hSubMenu=GetSubMenu(hMenu,i);

//get the number of items in the submenu and disable them individually.

int nSubItems=GetMenuItemCount(hSubMenu);

for (int j=0;j<nSubItems;j++)

{

HMENU hSubMenu=GetSubMenu(hMenu,i);.

int nSubItems=GetMenuItemCount(hSubMenu);

EnableMenuItem(hSubMenu,GetMenuItemID(hSubMenu,j),MF_BYPOSITION|MF_GRAYED);

}

}



0
6/1/2005 2:45:03 PM
vc.mfc 33608 articles. 0 followers. Follow

13 Replies
1213 Views

Similar Articles

[PageSpeed] 59

If the menu is disabled, there is no need to disable its submenu items, because it won't
drop anything down.

Why are you writing code like the code below? There is no need to get either an HMENU or
an HWND. MFC has nice methods that already deal with this.

CMenu * menu = GetMenu();  // CWnd::GetMenu in the mainframe, for example
for(int i = 0; i < menu->GetMenuItemCount(); i++)
   {
     EnableMenuItem(i, MF_BYPOSITION | MF_GRAYED);
   }
DrawMenuBar();

THis should only be executed in the mainframe.

Note how much shorter this is than the complex code below!

Also note that you forgot to call DrawMenuBar...
					joe

On Wed, 1 Jun 2005 20:15:03 +0530, "Manikandan" <manikandan_r@hotmail.com> wrote:

>hi all,
>
>how to disable entire  menu and its sub menus.
>
>i tried the following code it gets the Menu ID but is not disabling the menu 
>items.
>HMENU hMenu;
>
>HWND hwnd = GetSafeHwnd();
>
>
>hMenu = ::GetMenu(hwnd);
>
>int nCount=GetMenuItemCount(hMenu);
>
>for (int i=0;i<nCount;i++)
>
>{
>
>//get the sub menu
>
>
>
>HMENU hSubMenu=GetSubMenu(hMenu,i);
>
>//get the number of items in the submenu and disable them individually.
>
>int nSubItems=GetMenuItemCount(hSubMenu);
>
>for (int j=0;j<nSubItems;j++)
>
>{
>
>HMENU hSubMenu=GetSubMenu(hMenu,i);.
>
>int nSubItems=GetMenuItemCount(hSubMenu);
>
>EnableMenuItem(hSubMenu,GetMenuItemID(hSubMenu,j),MF_BYPOSITION|MF_GRAYED);
>
>}
>
>}
>
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
6/1/2005 5:16:41 PM
If you are using MFC and the menu is attached to a CFrameWnd derived
class(eg CMainFrame), it uses ON_UPDATE_COMMAND_UI mechanism to
enable/disable menu items. This overrides whatever you are doing for menu
items.

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"Manikandan" <manikandan_r@hotmail.com> wrote in message
news:u0q6OirZFHA.3676@TK2MSFTNGP10.phx.gbl...
> hi all,
>
> how to disable entire  menu and its sub menus.
>
> i tried the following code it gets the Menu ID but is not disabling the
menu
> items.
> HMENU hMenu;
>
> HWND hwnd = GetSafeHwnd();
>
>
> hMenu = ::GetMenu(hwnd);
>
> int nCount=GetMenuItemCount(hMenu);
>
> for (int i=0;i<nCount;i++)
>
> {
>
> //get the sub menu
>
>
>
> HMENU hSubMenu=GetSubMenu(hMenu,i);
>
> //get the number of items in the submenu and disable them individually.
>
> int nSubItems=GetMenuItemCount(hSubMenu);
>
> for (int j=0;j<nSubItems;j++)
>
> {
>
> HMENU hSubMenu=GetSubMenu(hMenu,i);.
>
> int nSubItems=GetMenuItemCount(hSubMenu);
>
>
EnableMenuItem(hSubMenu,GetMenuItemID(hSubMenu,j),MF_BYPOSITION|MF_GRAYED);
>
> }
>
> }
>
>
>


0
ajaykalra (6842)
6/2/2005 1:06:11 AM
The only problem is that it can't, as far as I know, enable/disable top-level menu items,
because they do not have menu IDs. 
				joe

On Wed, 1 Jun 2005 21:06:11 -0400, "Ajay Kalra" <ajaykalra@yahoo.com> wrote:

>If you are using MFC and the menu is attached to a CFrameWnd derived
>class(eg CMainFrame), it uses ON_UPDATE_COMMAND_UI mechanism to
>enable/disable menu items. This overrides whatever you are doing for menu
>items.

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
6/2/2005 2:44:04 AM
thanks joseph it's working
many thanks again
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:uhqr915lggdvt9rteqm46ukhium0m195k3@4ax.com...
> If the menu is disabled, there is no need to disable its submenu items, 
> because it won't
> drop anything down.
>
> Why are you writing code like the code below? There is no need to get 
> either an HMENU or
> an HWND. MFC has nice methods that already deal with this.
>
> CMenu * menu = GetMenu();  // CWnd::GetMenu in the mainframe, for example
> for(int i = 0; i < menu->GetMenuItemCount(); i++)
>   {
>     EnableMenuItem(i, MF_BYPOSITION | MF_GRAYED);
>   }
> DrawMenuBar();
>
> THis should only be executed in the mainframe.
>
> Note how much shorter this is than the complex code below!
>
> Also note that you forgot to call DrawMenuBar...
> joe
>
> On Wed, 1 Jun 2005 20:15:03 +0530, "Manikandan" <manikandan_r@hotmail.com> 
> wrote:
>
>>hi all,
>>
>>how to disable entire  menu and its sub menus.
>>
>>i tried the following code it gets the Menu ID but is not disabling the 
>>menu
>>items.
>>HMENU hMenu;
>>
>>HWND hwnd = GetSafeHwnd();
>>
>>
>>hMenu = ::GetMenu(hwnd);
>>
>>int nCount=GetMenuItemCount(hMenu);
>>
>>for (int i=0;i<nCount;i++)
>>
>>{
>>
>>//get the sub menu
>>
>>
>>
>>HMENU hSubMenu=GetSubMenu(hMenu,i);
>>
>>//get the number of items in the submenu and disable them individually.
>>
>>int nSubItems=GetMenuItemCount(hSubMenu);
>>
>>for (int j=0;j<nSubItems;j++)
>>
>>{
>>
>>HMENU hSubMenu=GetSubMenu(hMenu,i);.
>>
>>int nSubItems=GetMenuItemCount(hSubMenu);
>>
>>EnableMenuItem(hSubMenu,GetMenuItemID(hSubMenu,j),MF_BYPOSITION|MF_GRAYED);
>>
>>}
>>
>>}
>>
>>
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 


0
leomani001 (16)
6/2/2005 10:26:19 AM
hi everyone,

by writing the below code as in many of the posts,  the menu doesnot 
disable, since the message handlers are defined for the menu items.
to disable the menu, which has message handlers, we need to set the
m_bAutoMenuEnableState=false or 0
this member variable will be a predefined member variable of CFrameWnd 
class, the best place of setting the m_bAutoMenuEnableState is in the 
constructor where the initinstance is called.


HWND hwnd = GetSafeHwnd();
Menu = ::GetMenu(hwnd);
int nCount=GetMenuItemCount(hMenu);
for (int i=0;i<nCount;i++)
{
HMENU hSubMenu=GetSubMenu(hMenu,i);
int nSubItems=GetMenuItemCount(hSubMenu);
for (int j=0;j<nSubItems;j++)
{

HMENU hSubMenu=GetSubMenu(hMenu,i);.
int nSubItems=GetMenuItemCount(hSubMenu);
EnableMenuItem(hSubMenu,GetMenuItemID(hSubMenu,j),MF_BYPOSITION|MF_GRAYED);

-- 
A.Selvendran
catchselvendran@yahoo.co.in,
Mindteck India Limited,
Prestige Towers
Bangalore



0
6/2/2005 12:55:04 PM
Aha! Forgot that trick...

But you still don't need to use HMENU and HWND.
		thanks
			joe

On Thu, 2 Jun 2005 05:55:04 -0700, "Selvendran" <catchselvendran@yahoo.co.in> wrote:

>hi everyone,
>
>by writing the below code as in many of the posts,  the menu doesnot 
>disable, since the message handlers are defined for the menu items.
>to disable the menu, which has message handlers, we need to set the
>m_bAutoMenuEnableState=false or 0
>this member variable will be a predefined member variable of CFrameWnd 
>class, the best place of setting the m_bAutoMenuEnableState is in the 
>constructor where the initinstance is called.
>
>
>HWND hwnd = GetSafeHwnd();
>Menu = ::GetMenu(hwnd);
>int nCount=GetMenuItemCount(hMenu);
>for (int i=0;i<nCount;i++)
>{
>HMENU hSubMenu=GetSubMenu(hMenu,i);
>int nSubItems=GetMenuItemCount(hSubMenu);
>for (int j=0;j<nSubItems;j++)
>{
>
>HMENU hSubMenu=GetSubMenu(hMenu,i);.
>int nSubItems=GetMenuItemCount(hSubMenu);
>EnableMenuItem(hSubMenu,GetMenuItemID(hSubMenu,j),MF_BYPOSITION|MF_GRAYED);

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
6/2/2005 4:07:26 PM
joseph ,

your code work fine for the main menu.

but i want to disable the sub menu items leaving the main menus  enabled.

how to do that?

thanks and regards
manikandan.r
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:piss9196ostusk5e6unoeorujlmpf0qnak@4ax.com...
> The only problem is that it can't, as far as I know, enable/disable 
> top-level menu items,
> because they do not have menu IDs.
> joe
>
> On Wed, 1 Jun 2005 21:06:11 -0400, "Ajay Kalra" <ajaykalra@yahoo.com> 
> wrote:
>
>>If you are using MFC and the menu is attached to a CFrameWnd derived
>>class(eg CMainFrame), it uses ON_UPDATE_COMMAND_UI mechanism to
>>enable/disable menu items. This overrides whatever you are doing for menu
>>items.
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 


0
6/3/2005 4:56:37 AM
hi selva

i used the m_bAutoMenuEnable variable.

but i want to only disable the sub menu items leaving the main menu enabled

how to do that?
plz help
regards
manikandan
"Selvendran" <catchselvendran@yahoo.co.in> wrote in message 
news:82616F6E-0C4B-4584-B2A9-54DF379F0527@microsoft.com...
> hi everyone,
>
> by writing the below code as in many of the posts,  the menu doesnot
> disable, since the message handlers are defined for the menu items.
> to disable the menu, which has message handlers, we need to set the
> m_bAutoMenuEnableState=false or 0
> this member variable will be a predefined member variable of CFrameWnd
> class, the best place of setting the m_bAutoMenuEnableState is in the
> constructor where the initinstance is called.
>
>
> HWND hwnd = GetSafeHwnd();
> Menu = ::GetMenu(hwnd);
> int nCount=GetMenuItemCount(hMenu);
> for (int i=0;i<nCount;i++)
> {
> HMENU hSubMenu=GetSubMenu(hMenu,i);
> int nSubItems=GetMenuItemCount(hSubMenu);
> for (int j=0;j<nSubItems;j++)
> {
>
> HMENU hSubMenu=GetSubMenu(hMenu,i);.
> int nSubItems=GetMenuItemCount(hSubMenu);
> EnableMenuItem(hSubMenu,GetMenuItemID(hSubMenu,j),MF_BYPOSITION|MF_GRAYED);
>
> -- 
> A.Selvendran
> catchselvendran@yahoo.co.in,
> Mindteck India Limited,
> Prestige Towers
> Bangalore
>
>
> 


0
leomani001 (16)
6/3/2005 5:14:37 AM
Manikandan,
i tried it out and it is working well. i tried to send you source code of 
the program, but there is some problem with your mail account could you 
please contact me from some other mail acount.
-- 
A.Selvendran
catchselvendran@yahoo.co.in
Mindteck India Limited,
Prestige Towers
Bangalore


"Manikandan" wrote:

> joseph ,
> 
> your code work fine for the main menu.
> 
> but i want to disable the sub menu items leaving the main menus  enabled.
> 
> how to do that?
> 
> thanks and regards
> manikandan.r
> "Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
> news:piss9196ostusk5e6unoeorujlmpf0qnak@4ax.com...
> > The only problem is that it can't, as far as I know, enable/disable 
> > top-level menu items,
> > because they do not have menu IDs.
> > joe
> >
> > On Wed, 1 Jun 2005 21:06:11 -0400, "Ajay Kalra" <ajaykalra@yahoo.com> 
> > wrote:
> >
> >>If you are using MFC and the menu is attached to a CFrameWnd derived
> >>class(eg CMainFrame), it uses ON_UPDATE_COMMAND_UI mechanism to
> >>enable/disable menu items. This overrides whatever you are doing for menu
> >>items.
> >
> > Joseph M. Newcomer [MVP]
> > email: newcomer@flounder.com
> > Web: http://www.flounder.com
> > MVP Tips: http://www.flounder.com/mvp_tips.htm 
> 
> 
> 
0
6/3/2005 8:36:05 AM
If you want to disable menu items, why not use ON_UPDATE_COMMAND_UI?

----------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6842)
6/3/2005 4:24:53 PM
Add WM_COMMAND_UI handlers for each menu item.
				joe
On Fri, 3 Jun 2005 10:26:37 +0530, "Manikandan" <manikandan_r@hotmail.com> wrote:

>joseph ,
>
>your code work fine for the main menu.
>
>but i want to disable the sub menu items leaving the main menus  enabled.
>
>how to do that?
>
>thanks and regards
>manikandan.r
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:piss9196ostusk5e6unoeorujlmpf0qnak@4ax.com...
>> The only problem is that it can't, as far as I know, enable/disable 
>> top-level menu items,
>> because they do not have menu IDs.
>> joe
>>
>> On Wed, 1 Jun 2005 21:06:11 -0400, "Ajay Kalra" <ajaykalra@yahoo.com> 
>> wrote:
>>
>>>If you are using MFC and the menu is attached to a CFrameWnd derived
>>>class(eg CMainFrame), it uses ON_UPDATE_COMMAND_UI mechanism to
>>>enable/disable menu items. This overrides whatever you are doing for menu
>>>items.
>>
>> Joseph M. Newcomer [MVP]
>> email: newcomer@flounder.com
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm 
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
6/4/2005 5:16:52 AM
yes ajay  i used ON_UPDATE_COMMAND_UI and now it's working thanks for ur 
advise.
regars
manikandan

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1117815893.321691.101300@o13g2000cwo.googlegroups.com...
> If you want to disable menu items, why not use ON_UPDATE_COMMAND_UI?
>
> ----------
> Ajay Kalra
> ajaykalra@yahoo.com
> 


0
6/4/2005 5:45:45 AM
yes joe it is working thanks
regards
mani
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:l9e2a1dvt1vhiqpqk17p2rgcr6tgk7u790@4ax.com...
> Add WM_COMMAND_UI handlers for each menu item.
> joe
> On Fri, 3 Jun 2005 10:26:37 +0530, "Manikandan" <manikandan_r@hotmail.com> 
> wrote:
>
>>joseph ,
>>
>>your code work fine for the main menu.
>>
>>but i want to disable the sub menu items leaving the main menus  enabled.
>>
>>how to do that?
>>
>>thanks and regards
>>manikandan.r
>>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
>>news:piss9196ostusk5e6unoeorujlmpf0qnak@4ax.com...
>>> The only problem is that it can't, as far as I know, enable/disable
>>> top-level menu items,
>>> because they do not have menu IDs.
>>> joe
>>>
>>> On Wed, 1 Jun 2005 21:06:11 -0400, "Ajay Kalra" <ajaykalra@yahoo.com>
>>> wrote:
>>>
>>>>If you are using MFC and the menu is attached to a CFrameWnd derived
>>>>class(eg CMainFrame), it uses ON_UPDATE_COMMAND_UI mechanism to
>>>>enable/disable menu items. This overrides whatever you are doing for 
>>>>menu
>>>>items.
>>>
>>> Joseph M. Newcomer [MVP]
>>> email: newcomer@flounder.com
>>> Web: http://www.flounder.com
>>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>>
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 


0
6/9/2005 9:18:05 AM
Reply:

Similar Artilces:

Add Sub to Button Bar
Is it possible to add a button to the bar at the top and have it run a SUB I wrote? I have several SUBs that I have to run on many different spreadsheets and I get tired of having to attach the module and then run it. It would be so much easier if I could add a button like Adobe does. Do you have your modules in personal.xls? If so, then it is easy to run them from a toolbar. Right click on the toolbar and choose Customize from the popup menu In the dialog, navigate to the Commands tab In the left panel select Tools In the right panel scroll to the bottom and choose one of the Custom ic...

Disable BU
A really quick one for you. If I disable a BU in MSCRM, does the corresponding OU in Active Directory become disabled? I think the answer probably 'No' as I actually cannot find a way to disable the OU manually and therefore cannot check, but if anyone has a definitive answer I would be grateful. Regards Peter John - thanks for your help. Regards Peter >-----Original Message----- >No, disabling BU in CRM will not disable corresponding OU in the AD, just like dissabling CRM user in CRM will not siable the corrsponding user in AD. > >"Pete" wrote: > &...

Print Preview "Prev Page" but is always disabled
Hello, I have created an MFC application and have added Printing and Print Preview capability. The only problem i have is that the Prev Page button on the Print Preview toolbar is always disabled. The "Two Pages" button and "Next Page" are enabled and work correctly. I am setting the CPrintInfo::SetMaxPage() and CPrintInfo::SetMinPage() and CPrintInfo::m_nCurPage values in OnPreparePrinting() but this doesnt seem to make a difference. Is their anything else that i can try which will enable this button? Thanks Andy ...

how can disable service with bat file
Hi, Please tell me, how can i disable service with bat file. What service? "Vijay" wrote: > Hi, > > Please tell me, how can i disable service with bat file. > Please tell me, how can i disable service with bat file. That's funny ... weren't we just talking about Permissions? :-) Anyway, the command to control a Windows Service (enable, start, stop, disable, etc) is SC.EXE. Run SC /? at a command prompt to see the syntax. Put the necessary SC command in a batch file, and you are all set. Hope it helps, Andrew -- amclar at ...

How do you delete a custom menu?
Hello, Ive got a menu labed "Make Report" under Tools. There is no arrow to expand next to it like some menus, just the text "Make Report." I want to get rid of this. How do I do this? Right click somewhere up in the toolbar area. From the popup menu, choose Customize from the end of the list. With the Customize dialog open, drag the unwanted menu item off the menu bar into the main area of the worksheet. Then, close the Customize dialog. Cordially, Chip Pearson Microsoft MVP 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com [email on web ...

disable macro warning
I added macro which I then deleted. Every time I enter system it asks me if I want to disable or enable macros - how do I turn off this warning screen upon entering system when I have no macros in the worksheet? You need to remove the module that contained the macro. Press ALT+F11, go to View > Project Explorer (if needed), right-click on the module(s), and remove it. Save. HTH Jason Atlanta, GA >-----Original Message----- >I added macro which I then deleted. Every time I enter >system it asks me if I want to disable or enable macros - >how do I turn off this warnin...

Snakeing Sub Report
I have a members database with people divided into groups or categories etc. The report I am trying to do is have many columns at the group header level with only one field - the fullname of all those members in the detail section for that group. What I would like to have is this information is snaked through about 3 columns in this detail section. Is there any way of doing it? Could it be a macro? Except I cannot think how to go about it! In a sub-report you can have multiple columns but you must use across then down layout and not down then across. If that...

Disable sending Email
In Exchange 5.5 in an NT Domain, is there a way to disable an user from sending email? He should be able to open and read his email but not be able to send out email untill permitted. Thanks On Wed, 16 Mar 2005 15:01:03 -0800, "SI" <SI@discussions.microsoft.com> wrote: >In Exchange 5.5 in an NT Domain, is there a way to disable an user from >sending email? He should be able to open and read his email but not be able >to send out email untill permitted. > >Thanks You can do this on Internet mail by setting the Delivery Restriction on the IMS to deny mail...

Disable Cached Mode
Hi all! Is there any way to disable Cached Mode (CM) on Exchange 2003? Sure, I can do it with GPO, but some computers can be out of scope of this GPO and then they will be able to turn on the CM in their Offce 2003. But CM is critical security risk and I have to disable it. At http://office.microsoft.com/en-us/assistance/HP010000781033.aspx?Product=out2003 I can read: "Exchange server administrators have the ability to disable this feature in Outlook. For more information, contact your Exchange server administrator. Additional information for administrators is available in the Mi...

SMTP being disabled
HI Exchange 2003 / Server 2003 I'm just having a world of problems with Exchange all of a sudden... It's been up and running about 2 months but all of a sudden it's going nuts... The SMTP service is being stopped and set to disabled. This is happening each morning around 1 AM. The only thing I can find in the event logs is event 7035 - The SMTP service was successfully sent a stop control and then Event 7040 - The start type of SMTP service was changed from auto start to disabled For the life of me, I can't find what is originating these commands.... I thought maybe t...

Modify Menu behavior
I am looking to modify the way the menus work in excel (specifically, I am looking for menu changes on certain items). I have created a custom menu bar, which allows users to access certain files on our network, with specific search criteria. In the custom menu, I have created a utility which allows the user to change the search criteria before accessing the file. My one complaint, is that everytime I select something in the menu (or any menu), the menu closes after the action is performed. Is there anyway to change the settings (either with VBA on a specific button selection, or in general)...

Protecting sheet disables Grouping buttons
I am delivering a worksheet to a client, and have protected it. As well as stopping people changing the data, though, it also stops them using the Grouping buttons. How can I enable grouping on a protected sheet? If you already have the outline applied, you can protect the worksheet in code (auto_open/workbook_open??). Option Explicit Sub auto_open() With Worksheets("sheet1") .Protect Password:="hi", userinterfaceonly:=True .EnableOutlining = True .EnableAutoFilter = True End With End Sub (I wasn't sure what caused your outlining--...

Enable/Disable Macro Pop-Up
In the older version of Office when you opened an excel or other office document that had a macro in it - you would get a pop up and the opportunity to enable or disable it. Is there a way to get that same pop-up in 2007? See Help, macro setting Change macro security settings in Excel juamig wrote: > In the older version of Office when you opened an excel or other office > document that had a macro in it - you would get a pop up and the opportunity > to enable or disable it. Is there a way to get that same pop-up in 2007? > Right, someone else told me the...

Disabling New Records on Forms in VB
Hi Everyone, I have designed a form which successfully supresses the ability to create new records by setting the AllowAdditions property to "No". The problem is that when I open the form using the code below the form once again allows additions and I can't figure out how to prevent this. I tagged the "Me.AllowAdditions = False" into the openargs section but to no avail. If anyone can spot the problem in my code I would be very grateful. Thanks, John ******* Start Code ******* Private Sub cmdView_Click() Dim stDocName As String Dim stLinkCriteria As ...

Disable username, password and domain prompt
Greetings... I currently have a network with computers running Windows 2000 with Outlook 2000 SR-1 and am in the process of upgrading the computers to Windows XP with Outlook 2002 SP3. One of my users has an issue where he has to type in his username, password, and the domain every time he opens up Outlook on the Windows XP machines, but never on the Windows 2000 machines. The option to uncheck the "Always prompt for username and password" box is not found on either version of Outlook, and he is set up for NT password authentication in his Outlook settings. Is there something else...

Gray out items in shortcut menu
I built a shortcut menu with 4 items. Depending on a form's value I would like to gray out one of the menu items so that it can't be selected. Is this possible? Thanks, Lars Set the enabled property of the command button to NO. -- Milton Purdy ACCESS State of Arkansas "Lars Brownies" wrote: > I built a shortcut menu with 4 items. Depending on a form's value I would > like to gray out one of the menu items so that it can't be selected. Is this > possible? > > Thanks, > Lars > > . > But then all items...

"News" choice missing from Go Menu
Hi, Yesterday I quite easily added the "News" option to my Outlook 2003 "Go" menu and proceeded to download newsgroups from my ISPs NNTP server. Everything was working fine until next time I started Outlook and noticed that the News option is no longer in the Go menu. But News has vanished altogether now. I cannot add News back to the Go menu the way I originally did (described earlier). I can't find it anywhere? Any ideas? TIA, Matt Go to Control Panel/Internet Properties/Programs and set Outlook Express as the newsgroup reader. Restart Outlook and all ...

Disable Trended Deposits
Does anyone know how to turn off trended deposits (forecasted) feature? If you press the customize option on the left hand side, you can change it to show budget entries instead of trends -- Glyn Simpson, Microsoft MVP - Money Check http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny for UK tips and fixes for MS Money. To send Microsoft your wishes or suggestions, use http://register.microsoft.com/mswish/suggestion.asp or http://www.microsoft.com/uk/support/money/feedback especially if it's a UK specific wish. I do not respond to any unsolicited email regarding Money <a...

disable F1
Is there a way to disable the F1 Hot Key so that the Help Menu doesn't pop up? Place these in a standard module: Sub DisableF1() Application.OnKey "{F1}", "" End Sub Sub EnableF1() Application.OnKey "{F1}" End Sub HTH Jason Atlanta, GA >-----Original Message----- >Is there a way to disable the F1 Hot Key so that the Help Menu doesn't pop up? >. > ...

Disable page caching without disabling caching of jpegs and stylesheets etc
Hi, We have a data based web app that basically must not cache any of the pages as they contain real time data. I am currently using the following line in the page template on the PreInit event: Response.Cache.SetCacheability(HttpCacheability.NoCache) Will this prevent things like Jpegs and CSS stylesheets from being cached as well? If so is there another way of doing this? Cheers, James JimLad wrote: > We have a data based web app that basically must not cache any of the > pages as they contain real time data. > > I am currently using the following line...

Disabling users from deleting item in their inbox
Iam trying to figure out how to disallow certain users from deleting email from their inbox. I have a few users that delete item they are not supposed to and would like to know if i can disable them from doing so. Or is there a way to disable the empty deleted items? thanks Frank frank@interconnectnetworks.com <frank@interconnectnetworks.com> wrote: > Iam trying to figure out how to disallow certain users from deleting > email from their inbox. I have a few users that delete item they are > not supposed to and would like to know if i can disable them from > doing so. Or...

Some menu functions disabled
Hi I have just received an excel file that has a lot of the menu and tool bar options disabled. For example, in one of the sheets, rows 1-10 have been hidden but the option 'unhide' in the menu is disabled Any ideas? Hi maybe the file/worksheet is protected. Goto 'Tools - Protection' and unprotect it >-----Original Message----- >Hi > >I have just received an excel file that has a lot of the >menu and tool bar options disabled. > >For example, in one of the sheets, rows 1-10 have been >hidden but the option 'unhide' in the menu is disable...

Macro and sub rountines
I have a spreadsheet with 100 tabs, it is automatically created from another program (Microsoft FRx Financial Statement program) I need to reformat each tab so that the report will print the way I want it to. I was able to create a macro that does what I want, but I don't know how to easily copy it so that it works universally for all tabs in the workbook. This is what I tried but it doesn't work and I need some help The problem is with Sub Macro2(), I don't know how to set up a nested macro so the macro will repeat itself for all tabs in the workbook Sub Macro2() ' &...

disable public folder error
Exchange 5.5 sp4 - continue to get this RED event 1147 error: Error --- while disabling rule on public folder with rule ID 100. The folder ID of the public folder is in the data section of this event. there is no other information - how do I find out which public folder this belongs to? Nancy Stevens NStevens@tycoint.com I was looking this up and found that there may be an eventID 8528 somewhere before the 1147 events in the log that may shed light on what is causing the error. Based on what I read, seems like it may be a mailbox that is full. Hope that helps! -Iona -- Iona Wilson ...

How Best to Disable <ESC> Key on Form
My problem surrounds the <ESC> key function by design within Access. In my office we have a major departmental database being accessed by 20-30 users at any given time. 1. This is NOT an issue of the number of simultaneous users. 2. It IS a problem of users ACCIDENTALLY hitting <ESC> ocassionally while they are entering data into this database. + The users are using this database and another commercial database (non-Access, which has different functional use for the <ESC> key than in Access) toggling back and fort...