<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Problems with ActiveX - DOM documentElement change</title><link>https://www.infopathdev.com:443/forums/thread/18084.aspx</link><pubDate>Thu, 18 Aug 2005 17:33:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18084</guid><dc:creator>jimbob</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18084.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18084</wfw:commentRss><description>Try storing the return value of resources.GetObject(...) to see what is being returned.  It might help determining what's going on.&lt;br /&gt;&lt;br /&gt;Jim Cantwell&lt;br /&gt;InfoPathDev - Redmond</description></item><item><title>Problems with ActiveX - DOM documentElement change</title><link>https://www.infopathdev.com:443/forums/thread/17982.aspx</link><pubDate>Thu, 18 Aug 2005 09:44:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17982</guid><dc:creator>scarabxx</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17982.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=17982</wfw:commentRss><description>Hello &lt;br /&gt;&lt;br /&gt;I have an ActiveX (Basically an UserControl from Window.Forms &lt;br /&gt;namespace)written C# (.NET 1.1) which is used in MS InfoPath for displaying &lt;br /&gt;images.&lt;br /&gt;&lt;br /&gt;The problem is that "sometimes" when constructor of my User control is called &lt;br /&gt;I got an Exception (Specified cast is not valid).&lt;br /&gt;&lt;br /&gt;The "sometimes" - I mean: the refresh in MS InfoPath caused by changing of &lt;br /&gt;DOM where my ActiveX is binded. In normal cases like opening document the &lt;br /&gt;ActiveX works perfect - no exception (see 2.). &lt;br /&gt; &lt;br /&gt;My UserControl had set "Localizable" property to true so settings of &lt;br /&gt;controls in my UserControl comes from embedded resources (See 1 and 2.):&lt;br /&gt;&lt;br /&gt;1) //(from InitializeComponet method)&lt;br /&gt;System.Resources.ResourceManager resources = new &lt;br /&gt;System.Resources.ResourceManager(typeof(MyUserControl));&lt;br /&gt;&lt;br /&gt;2) this.uiPictureBox.Location = &lt;br /&gt;((System.Drawing.Point)(resources.GetObject("uiPictureBox.Location"))); &lt;br /&gt;//This is where Exception is thrown&lt;br /&gt;&lt;br /&gt;The problem can NOT be in resource file because ActiveX live under normal &lt;br /&gt;condition OK, but I strongly suspect ResourceManager, that under some (for me &lt;br /&gt;unknown) conditions behaves that it has resources loaded, but attemt to cast &lt;br /&gt;retrieved resources throws an Exception.&lt;br /&gt;&lt;br /&gt;Thank You for Your reply&lt;br /&gt;</description></item></channel></rss>