如何摆脱Visio AnchorBar窗口(VSTO)标题中的“关闭”按钮?

时间:2018-11-11 20:12:59

标签: c# vsto visio

好的,我已经为Visio制作了一个VSTO,它使用AnchorBarAddon窗口。

创建窗口的代码如下:

if (parent == null || windowstates == null || Assigned) return false;
Window = null;
Window = parent.Windows.Add(
   bstrCaption: Caption,
   nFlags: windowstates,
   nType: (object)Visio.VisWinTypes.visAnchorBarAddon,
   nWidth: _content.Size.Width,
   bstrMergeID: _guid,
   bstrMergeClass: "",
   nMergePosition: 0
   );
int windowHandle = _content.Handle.ToInt32();
Win32.SetWindowLongW(windowHandle, Win32.GWL_STYLE, Win32.WS_CHILD | Win32.WS_VISIBLE);
Win32.SetParent(windowHandle, Window.WindowHandle32);
_content.Dock = DockStyle.Fill;
Window.GetWindowRect(out int left, out int top, out int width, out int height);
Window.SetWindowRect(left, top, width + addWidth, height + addHeight);

窗口创建了我不希望拥有的普通“关闭按钮”右上角的运动(屏幕截图) 我如何摆脱它? 提前致谢! enter image description here

0 个答案:

没有答案