我需要提供相当于超链接的功能,以便在我的UI中打开一个新的infopath表单。但是,这就是按钮应该做的全部 - 在InfoPath中通过filepath打开正确的表单,然后应该删除引用。
有谁知道怎么做?
谢谢!
badPanda
答案 0 :(得分:0)
void mDisplayForm_Click(object sender, EventArgs e)
{
int count = 0;
foreach (ToolStripMenuItem template in mDisplayForms)
{
if (sender.ToString() == template.Text)
{
Process infoPath = new Process();
infoPath.StartInfo.FileName = "InfoPath.exe";
infoPath.StartInfo.Arguments = templates[count];
infoPath.Start();
count++;
}
}
}
这是我用来解决问题的代码。