Given the code below on a form that has 4 fields and 1 button. This is run in infoPath not the browser.
I get the error that 'xPrintx.FormCode' does not contain a definition for 'Print' I thought that this derived from XMLForm. Am I missing something.
using Microsoft.Office.InfoPath;
using System;
using System.Xml;
using System.Xml.XPath;
namespace xPrintx
{
public partial class FormCode
{
public void InternalStartup()
{
((ButtonEvent)EventManager.ControlEvents["PrintThing"]).Clicked += new ClickedEventHandler(PrintThing_Clicked);
}
public void PrintThing_Clicked(object sender, ClickedEventArgs e)
{
this.Submit();
this.Print();
}
}
}