1
在WORD VSTO AddIn
中执行data binding operations时,如果要向用户显示成功或失败消息,您将如何执行此操作?例如,在Winform应用程序中,我们有MessageBox等。MS WORD VSTO - 如何显示消息
在WORD VSTO AddIn
中执行data binding operations时,如果要向用户显示成功或失败消息,您将如何执行此操作?例如,在Winform应用程序中,我们有MessageBox等。MS WORD VSTO - 如何显示消息
您使用System.Windows.Forms命名空间(您可能需要添加对System.Windows.Forms.dll的引用),并将其与Winform应用:
using System.Windows.Forms;
private void MsgBox()
{
MessageBox.Show("message in vsto");
}
如果停止工作,检查:
officeApp.DisplayAlerts = true;
您使用WinForm的命名空间,这样做的S ame作为Winform应用程序'MessageBox.Show()'。你不是试过这个吗? –
@JeremyThompson它的工作(谢谢你)。为了其他用户的利益,您可能希望将您的评论转换为“答案” - 正确解释需要添加的名称空间 - 并将其标记为答案。 – nam
OK欢呼:) –