<?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>Views</title><link>https://www.infopathdev.com:443/forums/42.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>disabling toolbars in an infopath form</title><link>https://www.infopathdev.com:443/forums/thread/52285.aspx</link><pubDate>Mon, 01 Mar 2010 09:49:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52285</guid><dc:creator>SARISILVA</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52285.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=52285</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello,&lt;/p&gt;&lt;p&gt;I want to disable the toolbars in an infopath form with c# code, and found this msdn article very useful on how to do so. &lt;/p&gt;&lt;p&gt;http://msdn.microsoft.com/en-us/library/bb608311%28office.11%29.aspx#officeinfopathcustomizinginfopathmenusandtoolbars_customizingmenusandtoolbars&lt;/p&gt;&lt;p&gt;This article also talks about re-enabling the toolbars, by writing the logic, in an event like OnSubmitRequest.&lt;/p&gt;&lt;p&gt;But, what if the user does not submit the form and just close the form with the windows (X) on the upper right corner?&lt;/p&gt;&lt;p&gt;or what if the system crashes, then there is no way to re-enable the toolbars.&lt;/p&gt;&lt;p&gt;Is there a workaround for this in infopath? HOw to re-enable the toolbars in such a way, that we know that code will execute when an infopath form closes. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>