Office 中的模态 Windows 窗体
我有一个在 VB.NET 中创建的模式 Windows 窗体,用于 PowerPoint 加载项(我怀疑这个问题也适用于 Excel 加载项)。该表单允许用户从 ListView
对象中选择当前幻灯片上的形状。每次选择时,都应在当前幻灯片上选择相应的形状。我知道我的代码正在识别正确的形状,但 Select 语句在附加到形状对象时将不起作用。据推测,这是因为该形式是模态的,而不是无模态的。
在不使表单成为无模式的情况下,有没有办法实际选择幻灯片上与所选 ListView 项目相对应的形状?也许有一种方法可以在表单打开时“刷新”应用程序(例如PowerPoint)以反映形状选择?
或者,有没有办法使表单变得无模式,同时表现得像模态表单?有问题的窗体由另一个模态 Windows 窗体“拥有”,使问题变得复杂。
I have a modal Windows form created in VB.NET that I am using for a PowerPoint add-in (this issue would also apply to an Excel add-in, I suspect). The form lets the user select shapes on the current slide from a ListView
object. With each selection, the corresponding shape should be selected on the current slide. I know that my code is identifying the proper shape, but the Select statement won't work when appended to the shape object. Presumably, this is because the form is modal, not modeless.
Without making the form modeless, is there a way to actually select shape on the slide corresponding to the selected ListView item? Perhaps there is a way to "refresh" the application (e.g. PowerPoint) while the form is open to reflect the shape selection?
Alternatively, is there a way to make the form modeless while behaving like a modal form? The form in question is "owned" by another modal Windows form, complicating matters.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论