InfoPath窗口更改事件 [英] InfoPath window change event

查看:103
本文介绍了InfoPath窗口更改事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用VSTO在 InfoPath功能区上工作.我使用的是在运行时会更改的组件,同时考虑了文档的内容.问题是当我打开多个文档时,功能区中的信息在每个文档中都是相同的.

根据我的阅读,addIn在InfoPath的所有打开的文档或窗口中共享,
因此,我目前正在InfoPath窗口或addIn功能区上查找 change事件或焦点事件.

任何帮助表示赞赏.
谢谢

I am currently working on an InfoPath ribbon using VSTO. I am using components that change at run time taking into consideration the content of the document. The problem is that when i open multiple documents the information in the ribbon is the same in every documen.

From what i read the addIn is shared across all open documents or windows of InfoPath,
so i am currently looking for a change event, or a focus event on the InfoPath window or the addIn ribbon.

Any help is appreciated.
Thank you

推荐答案

找到了:

Found it:

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
			InfoPath._Application3 iApplication = (InfoPath._Application3)this.Application;
			events = (InfoPath.ApplicationEvents)iApplication.Events;
			events.WindowActivate += new InfoPath._ApplicationEvents_WindowActivateEventHandler(events_WindowActivate);
		}

		void events_WindowActivate(InfoPath._XDocument pDocument, InfoPath.Window pWindow)
		{
			throw new NotImplementedException();
		}


这篇关于InfoPath窗口更改事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆