隐藏菜单栏 [英] Hiding Menu Bar

查看:83
本文介绍了隐藏菜单栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Application.CommandBars(Menu Bar)。Enabled = FALSE隐藏我的应用程序中的标准菜单。有时它会使菜单永久消失(即注册表设置已更改),有时则不会。对于想要使用外部访问的用户来说,这是一个问题。我的应用程序 - 他们看不到菜单,也不知道如何取回菜单。

我无法弄清楚菜单何时以及为何隐藏。

所以如果有人熟悉这个问题我会感激任何帮助。

I use Application.CommandBars("Menu Bar").Enabled=FALSE to hide the standart menu in my application. Sometimes it makes the menu disappear permanently (i.e, the registry settings are changed), and sometimes it does not. It is a problem for users who want to use Access "outside" my application - they cannot see the menu and don''t know how to get it back.
I cannot figure out when and why the menu stays hidden.
So if somebody is familiar with this issure I''d appreciate any help.

推荐答案

首先,不要使用该代码。要恢复该菜单,请转到视图菜单,工具栏,自定义,然后从列表中选中菜单栏。


而不是使用您拥有的内容,设置Access启动选项:检查/取消选中您想要或不想显示的栏。


或者您可以创建自己的客户栏。转到视图菜单,工具栏,自定义,然后单击新建按钮。按钮。之后,您只需将命令拖放到新栏。您可以使用代码或宏隐藏/显示您的栏。

ShowToolbar:

工具栏名称=您的工具栏名称在这里

显示=是/否

将您的宏命名为。 mcrShowMyMenu或mcrHideMyMenu


然后在您的代码中,请在表格A中打开:

docmd.RunMacro" mcrShowMyMenu"

在表格A中关闭:

docmd.RunMacromcrHideMyMenu


沿着这些方向的东西
First, don''t use that code. To bring back that menu, Goto view menu, toolbars, customize, then check Menu Bar from the list.

Instead of using what you have there, set your Access startup options: Check/Uncheck the bars that you want or don''t want to show.

Or you could create your own customer bars. Goto view menu, toolbars, customize, then click on "New" button. After that , you just drag and drop commands to your new bar. You can hide/show your bars with codes or macros.
ShowToolbar:
Toolbar Name = your toolbar name goes here
Show =Yes/No
Name your macro like. mcrShowMyMenu or mcrHideMyMenu

Then on your code, let say in form A Open:
docmd.RunMacro "mcrShowMyMenu"
In Form A Close:
docmd.RunMacro "mcrHideMyMenu

Something along those lines



而不是使用您拥有的内容,设置您的Access启动选项:选中/取消选中您想要或不想显示的栏。
Instead of using what you have there, set your Access startup options: Check/Uncheck the bars that you want or don''t want to show.



我不确定我不明白你的意思。我使用Access 2000格式,我不知道如何检查/取消选中启动选项中的栏。

I''me not sure I undestand what you mean by that. I use Access 2000 format, and I don''t see how can I check/uncheck the bars from startup options.


在访问工具菜单上,选择启动,启动对话框框会出现。出现了一堆复选框。在这里,您还可以更改应用程序标题,图标,在启动时显示任何表单。
On your Access Tools menu, select "Startup", Startup dialog box will appear. Whole bunch of check boxes appear. Here, you can also change application title, icon, display any form on startup.


这篇关于隐藏菜单栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆