<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx</link><description>We’ve been receiving a lot of questions recently regarding the support for Windows Forms based add-ins and hosts in a multi-AppDomain environment. Now that we’ve released .NetFX 3.5 with the support for passing WPF controls across AppDomains the lack</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#6974474</link><pubDate>Fri, 04 Jan 2008 05:53:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6974474</guid><dc:creator>Gordon Watts</dc:creator><description>&lt;p&gt;I have been using this technique for a while now - it works just fine. I was amazed when I first tried it that &amp;quot;it just worked&amp;quot;.&lt;/p&gt;
&lt;p&gt;The only difficulty I've had has to do with general performance -- but that isn't unique to WinForms.&lt;/p&gt;
&lt;p&gt;At any rate, if anyone is wondering, just stick your WinForms control in a WPF win form hosting control and you are off to the races.&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#6975500</link><pubDate>Fri, 04 Jan 2008 08:24:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6975500</guid><dc:creator>Miral</dc:creator><description>&lt;p&gt;It should actually be theoretically possible to do this with pure WinForms (well, WinForms plus p/invoke) by similarly creating a Control that can contain raw HWNDs on one side and a Control that can have a raw HWND as a parent on the other side. &amp;nbsp;It's more work, of course, until someone publishes the necessary glue classes ;)&lt;/p&gt;
&lt;p&gt;I briefly looked into doing this a couple of years ago with my own custom plugin implementation, but didn't get too far before realising that I didn't really need it anyway :)&lt;/p&gt;</description></item><item><title>plugins with gui</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#6980320</link><pubDate>Fri, 04 Jan 2008 18:29:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6980320</guid><dc:creator>Evor</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I'm gonna implement plugins for my WinForms application. Plugins will contains GUI. I wanna have ability to write GUI for plugin with WinForms, WPF and maybe GTK#. Which is the best way to do it with .NET 3.5?&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#6989064</link><pubDate>Sat, 05 Jan 2008 11:40:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6989064</guid><dc:creator>Marlun</dc:creator><description>&lt;p&gt;This sounds great. Could you post a code example on how to do this?&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#7004653</link><pubDate>Sun, 06 Jan 2008 14:39:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7004653</guid><dc:creator>Ariel</dc:creator><description>&lt;p&gt;Guys, I don't know if you are aware of it but all the samples download links are broken.&lt;/p&gt;
&lt;p&gt;for example:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/bb913903.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb913903.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Look at my forum entry:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2597659&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2597659&amp;amp;SiteID=1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can you help?&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#7044217</link><pubDate>Wed, 09 Jan 2008 21:51:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7044217</guid><dc:creator>JackG</dc:creator><description>&lt;p&gt;Ariel - The link worked for me. &lt;/p&gt;
&lt;p&gt;Gordon - Regarding perf. &amp;nbsp;Have you tried attributing your main method with [LoaderOptimization(MultiDomainHost)]? This will help with enabling WPF images to be shared accross AppDomains. &lt;/p&gt;
&lt;p&gt;JackG&lt;/p&gt;</description></item><item><title>Winforms and AppDomain isolation</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#7044463</link><pubDate>Wed, 09 Jan 2008 22:13:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7044463</guid><dc:creator>Jack Gudenkauf (JackG) WebLog</dc:creator><description>&lt;p&gt;We just posted a solution to consider for the F.A.Q. of how to enable isolatable WinForms applications.&lt;/p&gt;
</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#7080797</link><pubDate>Sat, 12 Jan 2008 02:11:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7080797</guid><dc:creator>Marlun</dc:creator><description>&lt;p&gt;The sample download at &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/8bxxy49h.aspx"&gt;http://msdn2.microsoft.com/en-us/library/8bxxy49h.aspx&lt;/a&gt; doesn't work for me neither. Also, maybe it is me but I can't find the F.A.Q you are talking about Jack? :)&lt;/p&gt;</description></item><item><title>Posted sample for Windows Forms/Controls in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#7102552</link><pubDate>Mon, 14 Jan 2008 00:09:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7102552</guid><dc:creator>noslenytram</dc:creator><description>&lt;p&gt;I posted a straight-forward example solution for integrating Windows Controls using CLR Add-ins.&lt;/p&gt;
&lt;p&gt;This example uses VS2005 and, other than the add-in pipeline itself, it is, from the perspective of the host and add-in developer, a *pure* Windows Forms experience.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://softwaregreenhouses.com/blog/2008/01/13/part-ii-windows-controls-extensibility-with-net-35-clr-add-ins-using-wpf-and-crossbow/"&gt;http://softwaregreenhouses.com/blog/2008/01/13/part-ii-windows-controls-extensibility-with-net-35-clr-add-ins-using-wpf-and-crossbow/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-- Marty Nelson&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#7106044</link><pubDate>Mon, 14 Jan 2008 12:40:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7106044</guid><dc:creator>Ariel</dc:creator><description>&lt;p&gt;Hi Jack,&lt;/p&gt;
&lt;p&gt;Thanks for the reply, but I think you missed my point.&lt;/p&gt;
&lt;p&gt;The link to this page works, but if you scroll into it, the Download Sample link is pointing at the general &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/"&gt;http://msdn2.microsoft.com/en-us/library/&lt;/a&gt; instead of pointing to the file sample.&lt;/p&gt;
&lt;p&gt;Please help restoring those very important samples!&lt;/p&gt;
&lt;p&gt;You have my Thanks&lt;/p&gt;
&lt;p&gt;Ariel&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#7657434</link><pubDate>Wed, 13 Feb 2008 03:02:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7657434</guid><dc:creator>Ian Duncanson</dc:creator><description>&lt;p&gt;Jack/Jesse,&lt;/p&gt;
&lt;p&gt;Just reading the MSDN documentation on WPF add-ins, it says - &lt;/p&gt;
&lt;p&gt;&amp;quot;Due to limitations with application domains, unhandled exceptions that are thrown in add-in application domains cause the entire application to crash, even though the isolation boundary exists. However, WPF and the .NET Framework add-in model provide a simple way to work around this problem and improve application stability. A WPF add-in that displays a UI creates a Dispatcher for the thread that the application domain runs on, if the host application is a WPF application. You can detect all unhandled exceptions that occur in the application domain by handling the UnhandledException event of the WPF add-in's Dispatcher. You can get the Dispatcher from the CurrentDispatcher property.&amp;quot;&lt;/p&gt;
&lt;p&gt;I have not however been able to get this to work? Is the documentation incorrect, or if it is correct, is there a sample you have showing this capability?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ian&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#7679875</link><pubDate>Wed, 13 Feb 2008 22:56:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7679875</guid><dc:creator>CLR Add-In Team</dc:creator><description>&lt;p&gt;I'm not sure there is enough detail in the WPF docs to make this easy to implement. &lt;/p&gt;
&lt;p&gt;There are a few blog articles that include full samples (and explanations for how/why they work) that should be helpful for you:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/clraddins/archive/2007/05/01/using-appdomain-isolation-to-detect-add-in-failures-jesse-kaplan.aspx"&gt;http://blogs.msdn.com/clraddins/archive/2007/05/01/using-appdomain-isolation-to-detect-add-in-failures-jesse-kaplan.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/clraddins/archive/2007/05/03/more-on-logging-unhandledexeptions-from-managed-add-ins-jesse-kaplan.aspx"&gt;http://blogs.msdn.com/clraddins/archive/2007/05/03/more-on-logging-unhandledexeptions-from-managed-add-ins-jesse-kaplan.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#7723989</link><pubDate>Sat, 16 Feb 2008 01:59:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7723989</guid><dc:creator>Eric Brand</dc:creator><description>&lt;p&gt;Does someone have an example of a MDI parent host loading add-ins at runtime that show MDI children UI? My understanding is that forms (not user controls) *can* be utilized in the new System.AddIn framework but only via WPF. Does anyone have an easy-to-follow example of this in action?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#8345352</link><pubDate>Mon, 31 Mar 2008 12:52:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8345352</guid><dc:creator>Luo Cao</dc:creator><description>&lt;P&gt;I have used this technical now. It worked, but with problems: how to change the size of ElementHost to size of the WindowsForms control which will be hosted? Can anyone help?&lt;/P&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#8748764</link><pubDate>Fri, 18 Jul 2008 14:58:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8748764</guid><dc:creator>Peter Lillevold</dc:creator><description>&lt;p&gt;If you want to use WinForms without having the overhead of WPF there is actually a third option. &lt;/p&gt;
&lt;p&gt;Create an addin that will serve as the main application hosting your MDI form or whatever. When activating addins with user controls, make sure to activate them in the same appdomain as the main addin. This way, remoting of Control classes is avoided completely. &lt;/p&gt;
&lt;p&gt;The downside here of course is that we loose appdomain isolation between the main gui and addin gui. The good thing is that we keep isolation between GUI stuff and the host process and also gain some performance with not having to remote between UI elements.&lt;/p&gt;
&lt;p&gt;I have successfully used this technique and will, when time permits, write an article about it.&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#8896451</link><pubDate>Tue, 26 Aug 2008 10:00:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8896451</guid><dc:creator>Nuclear</dc:creator><description>&lt;p&gt;I have this problem too, anybody know solution for this?&lt;/p&gt;</description></item><item><title>re: Support for Windows Forms in Hosts and Add-Ins</title><link>http://blogs.msdn.com/clraddins/archive/2008/01/03/support-for-windows-forms-in-hosts-and-add-ins.aspx#9132744</link><pubDate>Sat, 22 Nov 2008 14:41:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9132744</guid><dc:creator>Kaan Özgen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm recently trying to build a PowerPoint COM Add-In which can support our activities at Porsche. &lt;/p&gt;
&lt;p&gt;I'm able -based on available samples on the internet- to create a button on the standard bar and trigger my form to show up. Though this is just the beginning and I'm already stuck.&lt;/p&gt;
&lt;p&gt;What I need to do is database (Access or XML) connections and based on the data gathered, add task boxes to the slide.&lt;/p&gt;
&lt;p&gt;Are there any samples which would guide me?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Kaan&lt;/p&gt;</description></item></channel></rss>