Threading in InfoPath

M

Mancha

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?
 
R

Rene Schrieken

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é
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top