closing infopath forms using c#
I have a couple of questions regarding infopath in conjunction with c# code.
1. How do u close an infopath form using c# code behind (service pack).
I tried the following methods that didn't work (mostly security exception or com exceptions:
using WIN = System.Windows.Forms;
WIN.Application.Exit();
WIN.Application.ExitThread();
thisApplication.ActiveWindow.Close(true);
thisApplication.ActiveWindow.Close(false);
thisApplication.Windows[0].Close(true);
thisApplication.Windows[0].Close(false);
thisApplication.Windows[1].Close(true);
thisApplication.Windows[1].Close(false);
thisApplication.Quit(true);
thisApplication.Quit(false);
2. How do u disable submit on a form (not just by disabling a button)
An answer to these questions would be wonderful (especially the first question).
Thanks in advance.
|