开发者

How to change position/size of the Shape Data Window

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

Thanks a lot.


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


Here's how to get the shape data window.

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜