如何在Visio 2010图形控件中关闭“更多形状和快速形状"菜单 [英] How to turn off the More Shapes and Quick Shapes menus in Visio 2010 Drawing Control

查看:734
本文介绍了如何在Visio 2010图形控件中关闭“更多形状和快速形状"菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从visio形状窗口中隐藏更多形状"和快速形状"菜单?我们已经将具有自定义形状的自定义模板添加到了visio绘图控件中,并且我们希望限制用户添加其他visio形状.这适用于Visio 2003和Visio 2007计算机.但是在Visio 2010绘图控件中,更多形状菜单出现在形状窗口中,并允许用户添加其他visio形状.

我们迭代了Windows集合,仅使我们自定义的模板窗口可见,并使其他窗口(包括"Shapes"窗口可见性)设置为false.但这也阻止了我们自己的模具出现在图形控件中.当使形状"窗口可见时,将出现我们的自定义模具,但更多形状"和快速形状"菜单出现在形状窗口的底部.如何避免这种情况?是否有任何属性可以从形状窗口中禁用这些菜单?

有什么方法可以使visio 2010绘图控件的行为类似于2007 visio控件.这将是一个很好的解决方案,因为这将解决2010图形控制中的另一个问题.无法像在visio 2007绘图控件中那样在visio 2010绘图控件中设置背景模具颜色和背景模具颜色渐变.

仅供参考:在使用Microsoft.Office.Interop.Visio的C#Windows应用程序中使用visio绘图控件.

How to hide the "More Shapes" and "Quick Shapes" menu from the visio shapes window? We have customized stencils with customized shapes added to our visio drawing control and we want to restrict users from adding other visio shapes. This works in Visio 2003 and Visio 2007 machines. But in Visio 2010 drawing control , the more shapes menu appears in the shapes window and allows the user to add other visio shapes.

We iterated the windows collection and made only our customized stencil windows visible and made the other windows including "Shapes" window visibility to false. But this prevented our own stencils too from appearing in the drawing control. When the Shapes window is made visible, our custom stencils appeared but the "more shapes" and "quick shapes" menus appeared at the bottom of the shapes window. How to avoid this? Is there any property to disable these menus from the shape window?

Is there any way to make the visio 2010 drawing control to behave like 2007 visio control. This would be a great solution as this would solve another problem in 2010 drawing control. The background Stencil color and background stencil color gradients could not be set in visio 2010 drawing control as we do in visio 2007 drawing control.

FYI: The visio drawing control is used in C# windows application using Microsoft.Office.Interop.Visio.

推荐答案

请尝试以下操作:

visioControl.Document.Application.DoCmd((short)Microsoft.Office.Interop.Visio.VisUICmds.visCmdHideMoreShapes);
Try this :

visioControl.Document.Application.DoCmd((short)Microsoft.Office.Interop.Visio.VisUICmds.visCmdHideMoreShapes);


这篇关于如何在Visio 2010图形控件中关闭“更多形状和快速形状"菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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