sciarp
sciarp

Reputation: 314

How to change position/size of the Shape Data Window

I am using C# and Visio 2007 SDK. Is there a way to show the shape data window in a particular position with a given size?

Thanks a lot.

Upvotes: 1

Views: 1500

Answers (2)

Alexandr
Alexandr

Reputation: 11

Here's how to get the shape data window.

Visio.Window winShapeData =
visioControl.Window.Windows.get_ItemFromID((int)Visio.VisWinTypes.visWinIDCustProp);

Upvotes: 1

DLRdave
DLRdave

Reputation: 14250

If you can get the Visio.Window object that represents the shape data window, then you should be able to use its WindowState, or the MergeClass, MergeID and MergePosition properties, or the SetWindowRect method to control its size, position and state.

See the property and method help for the Visio.Window class here:

http://msdn.microsoft.com/en-us/library/aa342293%28v=office.12%29.aspx

And this link lists the various values for the WindowState property:

http://msdn.microsoft.com/en-us/library/aa342166%28v=office.12%29.aspx

Here's how to get the pan/zoom window from the active window:

Application.ActiveWindow.Windows.ItemFromID(visWinIDPanZoom)

Hopefully, there is (and you can find) a constant that allows you to get direct access to the shape data window as well. Other visWinID* values are listed here:

http://msdn.microsoft.com/en-us/library/ms428302%28v=office.12%29.aspx

Upvotes: 2

Related Questions