Hi,
I'm using Visual Studio 2008 for creating a InfoPath template (C#).
I've created a datasource for submitting the form and I use that datasource in the FormSubmit eventhandler in my code. After the form is submitted to SharePoint I wan't InfoPath to close. Not only close the form, but close the eintire application. I use the following code for closing InfoPath:
thisApplication.ActiveWindow.Close(true);
This code closes InfoPath like I wan't it to but there is a problem. This code is executed before the submit event is finished. And InfoPath prompts me to save changes to the template. I've tried to use MultiThreading in my code but this is not working. I can't use the above code in a new thread.
Any suggestions anyone?
Regards, Sjoukje