NegotiateToolbars Property [Visio 2003 SDK Documentation]

Determines whether Microsoft Office Visio 2003 toolbars are merged with those of the host application when the Microsoft Office Visio Drawing Control 2003 is UI-active (has the keyboard focus).

boolRet = object.NegotiateToolbars

object.NegotiateToolbars = boolVal

boolRet    Boolean. True if display of Visio toolbars in the Drawing Control window is enabled. False if it is disabled, the default.

object    Required. An expression that returns a DrawingControl object.

boolVal    Required Boolean. True to enable display of Visio toolbars in the Drawing Control window. False to disable display of Visio toolbars, the default.

Version added

2003

Remarks

You can set the NegotiateToolbars property either at design time (for example, in the Properties window in Microsoft Visual Basic 6.0), or at run time, as shown in the following example. It is recommended that you set NegotiateToolbars at design time. If you do set NegotiateToolbars at run time, set the property prior to in-place activation of the Visio Drawing Control.

When NegotiateToolbars is set to True, you can use the methods and properties of the Visio object model to customize Visio toolbars in the Visio Drawing Control window.

Visio task panes are implemented as toolbars. If you set NegotiateMenus to True, but set NegotiateToolbars to False, menu commands such as Task Pane (View menu) and Microsoft Office Visio Help (Help menu) will be unavailable.

Note  If NegotiateToolbars is True, the Visio Drawing Control supports toolbar-space negotiation by means of the IOleInPlaceFrame interface. For this negotiation to function properly, the host container application must implement IOleInPlaceFrame correctly. For more information, search for "IOleInPlaceFrame" on MSDN.

When there is only a single instance of the control in your application, if you set the NegotiateMenus property to True and the NegotiateToolbars property to False, or vice versa, Visio task panes will not be displayed as expected. In order for Visio task panes to appear in the Visio Drawing Control, both properties must be set to the same value.

However, if your application uses multiple instances of the Visio Drawing Control, you can set either the NegotiateMenus property or the NegotiateToolbars property to True, but not both. If both properties are set to True when you are using multiple instances of the control in a single application, you will experience unexpected behavior.

Example

The following example shows how to set the NegotiateToolbars property at run time in the Form_Load() sub procedure of your Visual Basic program. For examples of how to display or modify one or more particular Visio toolbars, see the topics for the UIObject object and its member methods and properties, in this reference.

Private Sub Form_Load()

    vsoDrawingControl.NegotiateToolbars = True

End Sub

Applies to | DrawingControl object

See Also | About the Visio Drawing Control | About using the Visio Drawing Control in your application | HostID property | NegotiateMenus property | PageSizingBehavior property | Src property