<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>TaskPane events</title><link>https://www.infopathdev.com:443/forums/thread/93809.aspx</link><pubDate>Tue, 22 Oct 2013 08:46:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93809</guid><dc:creator>Dragonranger</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93809.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=93809</wfw:commentRss><description>&lt;p&gt;Hi, I have been experimenting with custom TaskPanes in &amp;nbsp;InfoPath 2007 and I have come across some unusual behaviour.&lt;/p&gt;&lt;p&gt;If you cast&amp;nbsp;TaskPane[0] to a&amp;nbsp;HtmlTaskPane and then cast&amp;nbsp;the HtmlWindow object to a HtmlWindow2Class.&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;The issue I&amp;#39;m having is that after a certain number the event stops firing!&amp;nbsp;&lt;/p&gt;&lt;p&gt;Yesterday it&amp;nbsp;was firing exactly 15 times every time, today it works exactly 21 times every time!&lt;/p&gt;&lt;p&gt;I tried this at home and work on another PC and it worked perfectly on InfoPath 2010 but it will not work on my&amp;nbsp;dev machine with 2007?&lt;/p&gt;&lt;p&gt;I wonder if anyone is able to shed any light on this?&lt;/p&gt;&lt;p&gt;Additional:&lt;/p&gt;&lt;p&gt;- I have tried using a dispatcher to make sure it is not a threading issue.&lt;/p&gt;&lt;p&gt;- If I wait till the events stop firing and then add the handler again it continues to work&amp;nbsp;normally after that!&lt;/p&gt;&lt;p&gt;- I have tried many different events they all have exactly the same result.&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>