Hi, I have been experimenting with custom TaskPanes in InfoPath 2007 and I have come across some unusual behaviour.
If you cast TaskPane[0] to a HtmlTaskPane and then cast the HtmlWindow object to a HtmlWindow2Class.
You can then attach a handler to the events such as onfocus etc. This actually works fine and I am currently (for testing purposes) using the event handler to add a line to a text box on the form so I know the event fired.
The issue I'm having is that after a certain number the event stops firing!
Yesterday it was firing exactly 15 times every time, today it works exactly 21 times every time!
I tried this at home and work on another PC and it worked perfectly on InfoPath 2010 but it will not work on my dev machine with 2007?
I wonder if anyone is able to shed any light on this?
Additional:
- I have tried using a dispatcher to make sure it is not a threading issue.
- If I wait till the events stop firing and then add the handler again it continues to work normally after that!
- I have tried many different events they all have exactly the same result.