隐藏工作表的关闭、恢复、最小化按钮
我有一个适用于 Excel 2007 的 VSTO 解决方案,其中我使用自己的控件覆盖 Office 菜单按钮和功能区。我使用可视化设计器来创建功能区,但我还通过注入 xml 来隐藏“文件”、“新建”、“打开”等按钮来覆盖默认的 Office 菜单按钮实现(我通过覆盖 RequestService 我的工作簿类中的方法)。
但是,我还想隐藏 3 个按钮,即位于工作表右上角的默认关闭、最小化和恢复按钮。据我所知,它们不是丝带的一部分。
我有它们的 id、WindowRestore、WindowClose 和 WindowMinimize,但我不知道在哪里覆盖它们的 Visible 属性,因为这些命令不是功能区的一部分。
有什么想法吗?
谢谢
I have a VSTO solution for Excel 2007 in which I override the Office menu button and the ribbon with controls of my own. I am using the visual designer to create the ribbon, but I am also overriding the default Office menu button implementation by injecting xml to hide the File, New, Open, etc. buttons (I do this by overriding the RequestService method in my workbook class).
However, there are 3 buttons that I would like to hide as well, namely the default close, minimize, and restore buttons found on the top right side of the sheet. They are not part of the ribbon as far as I can see.
I have their id's, WindowRestore, WindowClose and WindowMinimize, but I have no idea where to override their Visible property, since these commands are not part of the ribbon.
Any ideas?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论