Table of contents

Window.ZoomBehavior 属性 (Visio)Window.ZoomBehavior Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

确定 Microsoft Visio 文档或窗口的缩放行为。可读写。Determines the zoom behavior for a Microsoft Visio document or window. Read/write.


表达式ZoomBehaviorexpression . ZoomBehavior

表达式_一个表示一个窗口对象的变量。_expression A variable that represents a Window object.

返回值Return Value



要设置的所有新文档和窗口的缩放行为,请使用DefaultZoomBehavior属性。To set the zoom behavior for all new documents and windows, use the DefaultZoomBehavior property.

VisZoomBehavior在 Visio 类型库声明的下列常量的值是有效的ZoomBehaviorThe following constants declared by the Visio type library in VisZoomBehavior are valid values for ZoomBehavior .

visZoomNonevisZoomNone00未定义的缩放行为;使用文档或应用程序的缩放行为。这是默认值。Undefined zoom behavior; use the zoom behavior of the document or application. This is the default.
visZoomInPlaceContainervisZoomInPlaceContainer11容器执行缩放。The container performs the zoom.
visZoomVisiovisZoomVisio22Visio 执行缩放。Visio performs the zoom.
visZoomVisioExactvisZoomVisioExact44Visio 在就地打开时缩放;Visio 不调整缩放比例。Visio zooms when open in place; Visio does not adjust the zoom level

如果将ZoomBehavior设置为visZoomVisio ,Visio 调整某些离散值,例如 50%或 100%缩放级别,以优化和对齐行为的页面标尺和网格的外观。If ZoomBehavior is set to visZoomVisio , Visio adjusts the zoom level to certain discrete values, for example 50% or 100%, to optimize the appearance of the page rulers and grid, and of snap behavior.

如果将ZoomBehavior设置为visZoomInPlaceContainer ,Visio 将使用容器的应用接口执行缩放并强制内就地窗口调整到窗口缩放。如果容器不支持不需要此行为,不缩放会发生。If ZoomBehavior is set to visZoomInPlaceContainer , Visio uses the container's IOleCommandTarget interface to perform the zoom and forces a fit-to-window zoom within the in-place window. If the container does not support IOleCommandTarget , no zooming occurs.

如果将ZoomBehavior设置为visZoomVisioExact ,您可以为任何值,通过使用Window.Zoom属性或通过使用 Visio 用户界面中的显示比例滑块来设置缩放比例。If ZoomBehavior is set to visZoomVisioExact , you can set the zoom to any value, either by using the Window.Zoom property or by using the Zoom slider in the Visio user interface.

请注意 默认行为 ( visZoomNone ) 是不同于 Visio 2002 之前的版本中使用的行为。(在 Visio 2002 中,默认值是visZoomVisio 。若要复制在较早版本中看到的行为,请将该值设置为visZoomInPlaceContainerNote The default behavior ( visZoomNone ) is different from the behavior used in versions earlier than Visio 2002. (In Visio 2002, the default was visZoomVisio .) To replicate the behavior seen in earlier versions, set this value to visZoomInPlaceContainer .


下面的过程演示如何将Document.ZoomBehavior属性设置为复制 Visio 2000 的行为的值。The following procedure shows how to set the Document.ZoomBehavior property to the value that replicates Visio 2000 behavior.

Sub ZoomBehavior_Example() 

 ActiveDocument.ZoomBehavior = visZoomInPlaceContainer 

End Sub
© 2018 Microsoft