<?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>Automatic form generation - code behind problems</title><link>https://www.infopathdev.com:443/forums/thread/68680.aspx</link><pubDate>Mon, 25 Jul 2011 05:53:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68680</guid><dc:creator>przemek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68680.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=68680</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi :)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;My task is to generate infopath forms basing on informations from datasource. I will also need to take care of code behind generation. Inside .xsn we have already compiled .dll. What i would like to do is to be able to generate properly FormCode class on my own. The problem is FormCode is a partial class. If i try to compile part of code available through VS for applications i get errors caused by lack of the second part of FormCode class (InfoPath with just button inside throws error : &amp;quot;An object reference is required for the non-static field, method, or property &amp;#39;Microsoft.Office.InfoPath.EventManager.ControlEvents.get&amp;#39; &amp;quot;) . Does anybody know how to deal with this? Is there anywhere available FormCode class full body?&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>