<?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>WinForm application using the FormControl control slow in Win 7, fine in XP</title><link>https://www.infopathdev.com:443/forums/thread/94812.aspx</link><pubDate>Tue, 17 Dec 2013 19:34:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94812</guid><dc:creator>Jeffrey Schenk</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94812.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=94812</wfw:commentRss><description>&lt;p&gt;Background:&lt;/p&gt;
&lt;p&gt;I am hosting InfoPath documents within a VS 2008 WinForm application using the FormControl control. The application launches a WinForm with FormControl to host varying InfoPath documents. When the WinForm is closed, the FormClosing event close the active InfoPath document using the FormControl.Close() method followed by FormControl.Dispose() method. &lt;/p&gt;
&lt;p&gt;InfoPath 2007&lt;br /&gt;VS .Net Framework 3.5 sp1&lt;br /&gt;Microsoft.Office.InfoPath Run Time Version: v2.0.50727 Version 12.0.0.0&lt;br /&gt;Microsoft.Office.InfoPath.Client.Internal.Host Run Time Version: v2.0.50727 Version 12.0.0.0&lt;br /&gt;Microsoft.Office.InfoPath.FormControl Run Time Version: v2.0.50727 Version 12.0.0.0&lt;br /&gt;Microsoft.Office.Interop.InfoPath Run Time Version: v1.1.4322 Version 12.0.0.0&lt;br /&gt;Microsoft.Office.Interop.InfoPath.XML Run Time Version: v1.1.4322 Version 12.0.0.0&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Problem:&lt;/p&gt;
&lt;p&gt;When the application is installed on a Win XP machine the forms open and close in a timely manner.&lt;/p&gt;
&lt;p&gt;When the application is installed on a Win 7 machine the forms open in approximately the same time as on XP. The FormControl.Close() takes 1-2 seconds on XP, but on Win 7 it may take up to 30 seconds. If the same InfoPath document is opened and closed a second time the FormControl.Close() doubles to 60 seconds.&lt;br /&gt;If I comment out the FormControl.Close() the form closes in 1-2 seconds on Win 7.&lt;/p&gt;
&lt;p&gt;Has anyone run into this problem or have a solution? Can the FormControl.Close() be removed without causing other issues?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Jeff&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>