Hi,
can I use threading in InfoPath?
My problem is I compare a form with another form. I use managed code
(C#). I compare the forms by using the Word functionaliy. It takes a
few seconds and the user have to wait so long. How can I implement
that's run in the background. My suggestion is using threads in
InfoPath?
Sandeep - 20 Jan 2006 11:28 GMT
Hi
Here are some references on creating threads in C#:
http://www.suite101.com/article.cfm/c_sharp/96436
http://www.codeproject.com/csharp/workerthread.asp

Signature
Sandeep
www.autonomysystems.com
Rene Schrieken - 24 Jan 2006 12:08 GMT
InfoPath is very picky on the threads, as i understand the COM runs in an STA
thread and you can only access the COM/Infopath interop dlls from that thread
(more or less the same restriction as goes for access to WinForms Controls
from not the GUI thread)
So if you can manage to get the information you need in managed code (ie the
System.Xml.XmlDocument) you should be able to do the processing on a
background thread. After processing is done you have to callback into the
main thread to show the user the result of your comparison (inseet/replace
nodes on the XDocument . etc)
René
> Hi,
>
[quoted text clipped - 4 lines]
> that's run in the background. My suggestion is using threads in
> InfoPath?