<?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>The Visual Basic Team : Todd Apley</title><link>http://blogs.msdn.com/vbteam/archive/tags/Todd+Apley/default.aspx</link><description>Tags: Todd Apley</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>InteropForms ToolKit - Visual Studio 2008 edition (Todd Apley)</title><link>http://blogs.msdn.com/vbteam/archive/2008/03/05/interopforms-toolkit-visual-studio-2008-edition.aspx</link><pubDate>Wed, 05 Mar 2008 17:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8054387</guid><dc:creator>VBTeam</dc:creator><slash:comments>13</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/8054387.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=8054387</wfw:commentRss><description>&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;I apologize right away that it's been a while since I've blogged about the interop forms toolkit&amp;nbsp;although I've been doing&amp;nbsp;my best to&amp;nbsp;keep up with&amp;nbsp;issues and questions on the&amp;nbsp;&lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=879&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=879&amp;amp;SiteID=1"&gt;&lt;FONT color=#800080&gt;interop forums&lt;/FONT&gt;&lt;/A&gt;.&amp;nbsp;&amp;nbsp; It seems from the mail I've received that a lot of people are having good success at extending their legacy vb6 apps in interesting ways using the toolkit.&amp;nbsp; This post&amp;nbsp;is a follow-up to the channel9 video that Beth posted &lt;A href="http://channel9.msdn.com/ShowPost.aspx?PostID=388101" mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=388101"&gt;&lt;FONT color=#800080&gt;here&lt;/FONT&gt;&lt;/A&gt;.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;What's New - VS 2008&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;I wanted to use this posting to describe in more detail some of the content that I covered in that video.&amp;nbsp;&amp;nbsp; The main focus of the video was to describe&amp;nbsp;how with the release of Visual Studio 2008, what changes should people be aware of when they are using the toolkit and what advantages there are with upgrading their development environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Why use Visual Studio 2008?&amp;nbsp;&amp;nbsp; Part of the goodness of being a tester at Microsoft is that you get to play with technologies several years before they are released.&amp;nbsp;&amp;nbsp; I can certainly say that&amp;nbsp;if you are using VS 2005 (or before), you'll really appreciate using VS 2008 even if you don't take advantage of any of the new cool language features such as LINQ and XML literals.&amp;nbsp;&amp;nbsp; Specifically, you'll really&amp;nbsp;notice the work done&amp;nbsp;to make intellisense and performance of the editor far better than we have ever had it before.&amp;nbsp;&amp;nbsp; Anyway, I occasionally have to use older products (to track down bugs) and I pity the people who aren't already using 2008.&amp;nbsp;&amp;nbsp; Feel free to download the &lt;A href="http://www.microsoft.com/express/vb/default.aspx" mce_href="http://www.microsoft.com/express/vb/default.aspx"&gt;&lt;FONT color=#800080&gt;Express&lt;/FONT&gt;&lt;/A&gt; product and try it out!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;With that pitch out of the way ;-), let me now go into detail about the specific items I mentioned if you want to use the interop toolkit with VS 2008.&amp;nbsp;&amp;nbsp; When we released the toolkit, we weren't able to fully test it out since VS 2008 was in beta, although we did get most of the core scenarios working.&amp;nbsp;&amp;nbsp; That being said, here are things you should be aware of:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Installation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;OL type=1&gt;
&lt;LI style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Side by side installation.&amp;nbsp; If you have VS2005 and VS2008 installed, if you install the tookit, it won't register for VS2008.&amp;nbsp;&amp;nbsp; If you really need this functionality, add a post to the &lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=879&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=879&amp;amp;SiteID=1"&gt;&lt;FONT color=#800080&gt;interop forums&lt;/FONT&gt;&lt;/A&gt; and I'll post up more details on how to make this work for you.&amp;nbsp;&amp;nbsp; However, in general, you should just uninstall VS2005 since VS2008 is able to work with both types of projects and then run the interop toolkit setup again.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Developing your .NET code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Once you have the toolkit installed, you should be able to develop your interop usercontrol or forms project as normal.&amp;nbsp;&amp;nbsp; However, be aware of the following (learned from hours of doing things the hard way):&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL type=1&gt;
&lt;LI style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo2; tab-stops: list .5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;First, when you create your usercontrol project, create the project with a uniqueish name and then save the project.&amp;nbsp;&amp;nbsp; If you don't, you can easily run into odd problems with COM progID collisions and it makes it easier to mess up RegFree COM settings.&amp;nbsp;&amp;nbsp; In fact my channel9 video nearly didn't work b/c I just used the default name it gave me and I had already created a project of this name on another machine that I was trying to run the application on.&amp;nbsp; Ack!&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo2; tab-stops: list .5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Target frameworks.&amp;nbsp;&amp;nbsp;&amp;nbsp; When you create an interop usercontrol/forms project, the target framework will be set to 2.0 which means that you won't be able use things like LINQ in your project.&amp;nbsp;&amp;nbsp; To change this, just goto the compile properties tab/advanced compiler options page and change the target framework to 3.5.&amp;nbsp;&amp;nbsp; You may have to then add some references link system.xml to your project, although in general the VB compiler gives pretty good warnings/errors when you are missing appropriate references.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo2; tab-stops: list .5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;As mentioned in this &lt;A href="http://blogs.msdn.com/vbteam/archive/2007/06/04/deploying-applications-with-the-interopforms-2-0-toolkit.aspx" mce_href="http://blogs.msdn.com/vbteam/archive/2007/06/04/deploying-applications-with-the-interopforms-2-0-toolkit.aspx"&gt;&lt;FONT color=#800080&gt;post&lt;/FONT&gt;&lt;/A&gt;, the recommended way to develop hybrid applications is to use interop usercontrols and not not use the microsoft.interopformstools library unless you want to take advantage of some of its functionality (such as exposing application events and sharing global state).&amp;nbsp;&amp;nbsp; Consequently, I recommend you remove the reference to this assembly after you have created the control and when you do, compile your project -&amp;gt; you'll get a compile error in the activexcontrolhelpers.vb file where there are a couple of references to this assembly.&amp;nbsp;&amp;nbsp; Remove the entire "namespace my" section from the code and you should be fine.&amp;nbsp;&amp;nbsp;&amp;nbsp;Of course, all good tips bear some appropriate disclaimers, so I'll do the same.&amp;nbsp;&amp;nbsp; My recommendation to always use interop usercontrols is valid except in these situations:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;OL type=1&gt;
&lt;LI style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level2 lfo2; tab-stops: list 1.0in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Where tabbing keyboard access between then host control and the interopcontrol is critical.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;There are some known oddities where tabbing doesn’t work properly in these cases.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Start doing some basic prototyping and see if it works well enough for you.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level2 lfo2; tab-stops: list 1.0in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Where entry of DBCS characters is needed in the interop usercontrol.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;There is a known bug on this which hasn’t been fixed yet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/OL&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt 1in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;If you run into other bugs/problems, issues, the best way to get resolution is to search the interop forums or ask your question there. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;If you want though, you can contact product support as the interop toolkit is supported as well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo2; tab-stops: list .5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;3. Loading/Unloading of forms:&amp;nbsp;&amp;nbsp; If you place an interop usercontrol on a VB6 form and that form is repeatedly loaded and unloaded in your app, be forewarned that there are known issues in unloading releasing the usercontrol from memory, although it's easy in most cases to workaround.&amp;nbsp;&amp;nbsp; If your app has this type of behavior, what you should do is the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo2; tab-stops: list .5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Create a public method in your usercontrol project that calls the dispose() method in your usercontrol.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo2; tab-stops: list .5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;In the queryunload of the form that's hosting the control (or in some other reasonable place) you call this method.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BLOCKQUOTE&gt;
&lt;OL&gt;
&lt;LI style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo2; tab-stops: list .5in" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;When building a usercontrol project, be aware that even though it may say it compiled and build ok, it may not have entirely worked.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;There is a post build step that uses rc.exe to compile icon and manifest information into the assembly and the logic for this post build step does not work on VS 2008 due to a change in where they store rc.exe.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;You can see the post build step logic by going to the compile properties tab/build events dialog.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Basically, you just need to adjust the logic in this event to point to where rc.exe is located on your machine.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Here’s an example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt 1in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;"d:\wherever\rc.exe" /r "$(ProjectDir)InteropUserControl.rc"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;After you change this, recompile your project, and look in the “output window” to ensure that this step isn’t failing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Changing these settings for good:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Doing the 4 steps above isn’t really that hard and most of you probably will not develop too many of these controls, but if you find you want to automate/change the above for good, it’s not that difficult to do so.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;I’ll explain briefly here what you can do to change this.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;If you want more information, please make a request on the &lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=879&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=879&amp;amp;SiteID=1"&gt;&lt;FONT color=#800080&gt;interop forums&lt;/FONT&gt;&lt;/A&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo3; mso-add-space: auto" class=MsoListParagraphCxSpFirst&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;All the project settings are stored in various template files.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;You can see where the templates are stored by going to tools/options projects &amp;amp; solutions and seeing the “user project templates” and “user item templates” locations.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;If you look in those locations, you’ll find a “VB6 InteropForm Library.zip”, “VB6 UserControl.zip” file (and you’ll also find similar files in the item project template location).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;All you need to do in general is&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo3; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;a.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Create a backup of this file (in case something goes wrong)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo3; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;b.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Unzip the file&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo3; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;c.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Edit the appropriate .vbproj file (e.g. you can copy appropriate lines from a VS2008 project file that you use often and copy them over to the template location)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level2 lfo3; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;d.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Rezip the file and place it in the same location (you can give it a different name if you want)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 1in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo3; mso-add-space: auto" class=MsoListParagraphCxSpLast&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;At this point, if you restart VS2008, and choose your new template, it should use your new settings.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Hopefully, the above made sense and should be easy for you to do, but if not, ask away on the forums.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Consuming your .NET control from VB6:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;This is a &lt;U&gt;biggie&lt;/U&gt;!&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Regardless of whether you use VS 2005 or VS 2008, you’ll want to be aware of this if you create usercontrol projects.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;There was a bug in the .net framework which prevented VB6 from syncing events on usercontrol projects.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;We documented a workaround in the help we &lt;A href="ms-help://MS.InteropFormToolkit2.0/InteropFormToolkit20/Interop%20User%20Control%20Events.html" mce_href="ms-help://MS.InteropFormToolkit2.0/InteropFormToolkit20/Interop%20User%20Control%20Events.html"&gt;shipped&lt;/A&gt; which explained how to work around this.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;However, the good news is that this bug is now fixed in .net framework 3.5 or in the 2.0 SP1 framework (which you can get &lt;A href="http://www.microsoft.com/downloads/results.aspx?pocId=&amp;amp;freetext=.net%20framework&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/results.aspx?pocId=&amp;amp;freetext=.net%20framework&amp;amp;DisplayLang=en"&gt;&lt;FONT color=#800080&gt;here&lt;/FONT&gt;&lt;/A&gt;), so you can consume .net interop controls in the &lt;U&gt;same way you would do any other ActiveX control in VB6&lt;/U&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Additionally, this leads to some other scenarios that weren’t possible before (such as you can now have a vb6 usercontrol which hosts a .net usercontrol, etc…**), so please be aware of this change as the docs are now out of date.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Of course, you’ll need to ensure your clients have the patched framework as well.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;I’d add some demo code here, but I don’t think it’s necessary.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you are used to working with controls in VB6, you already know how to make it work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;**Make sure you read my "Developing .NET code section above for some caveots with this approach that might effect you.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Also, as I mentioned in the Channel9 video, I think the slickest way of developing these usercontrol projects is (from VS in your interop project), goto your debugging properties page, choose start external program and point it at where you have vb6.exe locally.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;You can then simply press F5 and VB6 will launch and you can do things like setting breakpoints, etc…&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Just be sure to remember (as I didn’t in my demo ;-) ) that if you stop debugging from VS, you will lose any unsaved changes in VB6.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Always make sure you save any changes in VB6 before you stop debugging!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Deploying your application:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;The best article we have for understanding everything w.r.t. deploying interop projects can be found &lt;A href="http://blogs.msdn.com/vbteam/archive/2007/06/04/deploying-applications-with-the-interopforms-2-0-toolkit.aspx" mce_href="http://blogs.msdn.com/vbteam/archive/2007/06/04/deploying-applications-with-the-interopforms-2-0-toolkit.aspx"&gt;&lt;FONT color=#800080&gt;here&lt;/FONT&gt;&lt;/A&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I’m confident that if you follow the guidelines there, it will help you deploy these applications in a painless way.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you have questions/concerns, look on the &lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=879&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=879&amp;amp;SiteID=1"&gt;&lt;FONT color=#800080&gt;interop forums&lt;/FONT&gt;&lt;/A&gt; or post a question there&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;(although I’ll monitor any comments to this post as well)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Also, if you search around, you’ll find a lot of interesting articles written by people doing things with the toolkit.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For instance, here’s a good &lt;A href="http://blogs.msdn.com/bethmassi/archive/2007/10/24/using-my-settings-and-wcf-configuration-with-the-interop-forms-toolkit.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2007/10/24/using-my-settings-and-wcf-configuration-with-the-interop-forms-toolkit.aspx"&gt;&lt;FONT color=#800080&gt;one&lt;/FONT&gt;&lt;/A&gt; on using my.settings with usercontrols.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;VB6 – Live long and prosper…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Anyway, I know that many of you feel that VB6 is a dead product and although it’s starting to certainly show its age, I think there’s still a lot of life left to it.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Heck, I even continue to use it in my job regularly for some internal tools we maintain.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;With the interop forms toolkit, it gives you the developer a straightforward way to start slowly incorporating .net functionality into your apps and learn new skills w/o losing the investment you already have made in your application logic.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Good luck!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;Toddap_MS&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8054387" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx">VB6_Migration/Interop</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/Todd+Apley/default.aspx">Todd Apley</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB2008/default.aspx">VB2008</category></item><item><title>Channel 9 Interview - Tips and Tricks with the Interop Forms Toolkit (Beth Massi)</title><link>http://blogs.msdn.com/vbteam/archive/2008/03/04/channel-9-interview-tips-and-tricks-with-the-interop-forms-toolkit-beth-massi.aspx</link><pubDate>Wed, 05 Mar 2008 09:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8039275</guid><dc:creator>VBTeam</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/8039275.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=8039275</wfw:commentRss><description>&lt;P&gt;&lt;A class="" href="http://channel9.msdn.com/ShowPost.aspx?PostID=388101" target=_blank mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=388101"&gt;Today I&amp;nbsp;posted a Channel 9 interview&lt;/A&gt; with&amp;nbsp;Todd Apley, Senior Test Lead on the VB Team, where he shows us a variety of tips and tricks with using the &lt;A href="http://msdn2.microsoft.com/en-us/vbasic/bb419144.aspx"&gt;Interop Forms Toolkit&lt;/A&gt; on Visual Studio 2008. He also shows us how to deploy a hybrid application built with VB 6 and VB.NET using XCopy deployment and RegFree-COM.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;A href="http://blogs.msdn.com/vbteam/archive/tags/Todd+Apley/default.aspx"&gt;Todd &lt;/A&gt;will also be posting follow-up information here on this blog. Also, check out &lt;A class="" href="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx" target=_blank mce_href="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx"&gt;interop posts here&lt;/A&gt;, &lt;A class="" href="http://blogs.msdn.com/bethmassi/archive/tags/Interop+Toolkit/Article/default.aspx" target=_blank mce_href="http://blogs.msdn.com/bethmassi/archive/tags/Interop+Toolkit/Article/default.aspx"&gt;articles on&amp;nbsp;my blog on interop&lt;/A&gt;&amp;nbsp;as well as&amp;nbsp;the rest of the &lt;A class="" href="http://channel9.msdn.com/Showforum.aspx?forumid=38&amp;amp;tagid=274" target=_blank mce_href="http://channel9.msdn.com/Showforum.aspx?forumid=38&amp;amp;tagid=274"&gt;VB Team Interviews on Channel 9&lt;/A&gt;.&lt;BR&gt;&lt;BR&gt;Enjoy,&lt;BR&gt;-&lt;A class="" href="http://blogs.msdn.com/bethmassi/" target=_blank mce_href="http://blogs.msdn.com/bethmassi/"&gt;Beth Massi&lt;/A&gt;, Visual Studio Community&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8039275" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx">VB6_Migration/Interop</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/Beth+Massi/default.aspx">Beth Massi</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/Todd+Apley/default.aspx">Todd Apley</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB2008/default.aspx">VB2008</category></item><item><title>InteropForms 2.0 Tip #1 - Font Property</title><link>http://blogs.msdn.com/vbteam/archive/2007/06/04/interopforms-2-0-tip-1-font-property.aspx</link><pubDate>Tue, 05 Jun 2007 02:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3088065</guid><dc:creator>VBTeam</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/3088065.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=3088065</wfw:commentRss><description>&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;(Starting today, we'll be highlighting various tips that might help you when using the InteropForms 2.0 toolkit.&amp;nbsp;&amp;nbsp; With the latest release of the toolkit, you can do some fairly impressive upgrades to your existing VB6 applications.&amp;nbsp; Don't believe me?&amp;nbsp; Check &lt;A class="" href="http://www.codeproject.com/useritems/VB6InteropToolkit2.asp" mce_href="http://www.codeproject.com/useritems/VB6InteropToolkit2.asp"&gt;this&lt;/A&gt; out as one cool example&amp;nbsp; - WPF in VB6 anyone?!)&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;If you don't have it, you can download the toolkit &lt;A class="" title=here href="http://msdn2.microsoft.com/en-us/vbasic/bb419144.aspx" mce_href="http://msdn2.microsoft.com/en-us/vbasic/bb419144.aspx"&gt;here&lt;/A&gt;.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;STRONG&gt;Adding Font Property:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Here's a tip on extending Interop Usercontrols that some of you might find useful.&amp;nbsp;&amp;nbsp; Most usercontrols have a "font" property associated with them which can inherit its values from its container and defines what font is used for the controls that it contains.&amp;nbsp;&amp;nbsp; If you want to add this support to your control, here's what you can do.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;1) From your VB6 Interop Usercontrol project, goto the references dialog on your project and add a reference to "stdole"&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;2) Open up your interopusercontrol control and in the "VB6 Properties" region, add this code:&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;BLOCKQUOTE class=ExternalClassA5FE57680D7B44F58E5A062B55282A50 dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;DIV&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shadows&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/FONT&gt;&lt;FONT size=2&gt; ControlFont() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; stdole.IFontDisp&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; fntTmp &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; Drawing.Font(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;MyBase&lt;/FONT&gt;&lt;FONT size=2&gt;.Font.Name, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;MyBase&lt;/FONT&gt;&lt;FONT size=2&gt;.Font.Size, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;MyBase&lt;/FONT&gt;&lt;FONT size=2&gt;.Font.Style, _&lt;/P&gt;
&lt;P&gt;System.Drawing.GraphicsUnit.Point, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CType&lt;/FONT&gt;&lt;FONT size=2&gt;(0, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Byte&lt;/FONT&gt;&lt;FONT size=2&gt;))&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Return&lt;/FONT&gt;&lt;FONT size=2&gt; ActiveXControlHelpers.GetIFontDispFromFont(fntTmp)&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Get&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Set&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; value &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; stdole.IFontDisp)&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;MyBase&lt;/FONT&gt;&lt;FONT size=2&gt;.Font = ActiveXControlHelpers.GetFontFromIFontDisp(value)&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Set&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/P&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;3) Open up ActiveXControlHelpers.vb and add this code to the activeXControlHelpers class&lt;/DIV&gt;
&lt;BLOCKQUOTE class=ExternalClassA5FE57680D7B44F58E5A062B55282A50 dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Friend&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shared&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shadows&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/FONT&gt;&lt;FONT size=2&gt; GetFontFromIFontDisp(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; obj &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Object&lt;/FONT&gt;&lt;FONT size=2&gt;) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; Font&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Return&lt;/FONT&gt;&lt;FONT size=2&gt; AxHost.GetFontFromIFontDisp(obj)&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Friend&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shared&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shadows&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/FONT&gt;&lt;FONT size=2&gt; GetFontFromIFont(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; obj &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Object&lt;/FONT&gt;&lt;FONT size=2&gt;) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; Font&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Return&lt;/FONT&gt;&lt;FONT size=2&gt; AxHost.GetFontFromIFont(obj)&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Friend&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shared&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shadows&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/FONT&gt;&lt;FONT size=2&gt; GetIFontDispFromFont(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; font &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; Font) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; stdole.IFontDisp&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;TryCast&lt;/FONT&gt;&lt;FONT size=2&gt;(AxHost.GetIFontDispFromFont(font), stdole.IFontDisp)&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/P&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;4) You can then compile your project and reference it from VB6 and set the "controlfont" property appropriately.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;This property was not included in the InteropForms 2.0 release since we didn't feel like it was that common of a scenario and it can make deploying the control in the general case a bit trickier.&amp;nbsp;&amp;nbsp; Specifically, you need to ensure that stdole.dll is deployed in the GAC which you can install by running a setup called vs_piaredist.exe which should be installed on your machine that has VS (typically in a \program files\common files\merge modules directory).&amp;nbsp;&amp;nbsp; It's a silent install, so it's pretty easy to deploy.&amp;nbsp;&amp;nbsp; However, you may find that all your clients have this installed and you don't need to worry about this.&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3088065" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx">VB6_Migration/Interop</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/Todd+Apley/default.aspx">Todd Apley</category></item><item><title>Deploying Applications with the InteropForms 2.0 toolkit</title><link>http://blogs.msdn.com/vbteam/archive/2007/06/04/deploying-applications-with-the-interopforms-2-0-toolkit.aspx</link><pubDate>Tue, 05 Jun 2007 02:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3088001</guid><dc:creator>VBTeam</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/3088001.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=3088001</wfw:commentRss><description>&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;(Recently, we released the InteropForms 2.0 toolkit which allows you to add the richness of .net windows forms to your vb6 application.&amp;nbsp; We've gotten a fair number of questions from customers asking for more details on deployment, so this will hopefully answer most of your questions)&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;As I'm sure you're aware, deploying VB6 COM based applications can get complicated at times, which is one of the great advantages that moving your applications to .NET gives you.&amp;nbsp;&amp;nbsp; The Interop Forms Toolkit 2.0&amp;nbsp;allows you to&amp;nbsp;easily extend your VB6 applications with .NET functionality, which is great,&amp;nbsp;but it creates some interesting&amp;nbsp;deployment issues.&amp;nbsp;&amp;nbsp; The good news is that there are some things we did in the latest 2.0 release to make this much easier than before and we tried to document the different strategies, but given that there are plenty of ways to do things, we wanted to blog about this in more detail.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;To save you some time, here's what we recommend in general with building mixed apps.&lt;/DIV&gt;
&lt;BLOCKQUOTE class=ExternalClassA5FE57680D7B44F58E5A062B55282A50 dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;DIV&gt;a)&amp;nbsp; Use the Interop Forms Toolkit to build Interop Usercontrols instead of Interop Forms.&lt;/DIV&gt;
&lt;DIV&gt;b)&amp;nbsp; Remove the reference&amp;nbsp;to Microsoft.InteropForms.dll library unless you plan on taking advantage of some of it's functionality such as the Globals&amp;nbsp;class (for sharing state) or the EventMessenger class (for raising application-level&amp;nbsp;events).&lt;/DIV&gt;
&lt;DIV&gt;c)&amp;nbsp; Configure your usercontrol manifest appropriately and create an application manifest for your VB6 app so you can take advantage of Reg-free COM &lt;/DIV&gt;
&lt;DIV&gt;d)&amp;nbsp; Modify your legacy setup to copy over your new usercontrol binary and the application manifest into your application folder.&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;If you can do this, you can easily augment an existing application in a painless way.&amp;nbsp; Deploying an application created this way is as simple as copying the new files down into the target directory.&amp;nbsp; Of course, this doesn't work for all situations and I've glossed over a few other details that should be mentioned.&amp;nbsp;&amp;nbsp; To decide on the best way to deploy your application, you have to deal with three issues.&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;1) Prerequisites:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;If you use an Interop usercontrol/form in your project, your clients need to have the .NET framework 2.0 installed on their system.&amp;nbsp;&amp;nbsp; This framework is on machines by default in Vista and may be on your client machines anyway, but if not, here's some options.&amp;nbsp;&amp;nbsp; (This assumes you have permissions to install/rollout .msi setups that globally effect the machine.)&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;BLOCKQUOTE class=ExternalClassA5FE57680D7B44F58E5A062B55282A50 dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;DIV&gt;1)&amp;nbsp;The recommended approach is to use the bootstrapper technology in VS 2005 to deploy any prereqs you need.&amp;nbsp;&amp;nbsp; You can create a custom bootstrapper which installs prereqs like the .net framework only if necessary and in&amp;nbsp;a secure way.&amp;nbsp;&amp;nbsp; These prereqs that the bootstrapper supports are typically called "bootstrapper packages" and you can see what's available on your machine by going to the Publish tab in the project designer and clicking on "Prerequisites" button.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;A "custom bootstrapper" is basically a special "setup.exe" that is built by VS that understands what prereqs are needed for your application.&amp;nbsp;&amp;nbsp; Once the prereqs are installed, it will launch whatever you want - typically the application setup.&amp;nbsp;&amp;nbsp; If you ever build a Setup and Deployment project in VS or publish a Clickonce app, the "setup.exe" that is created is a custom bootstrapper.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;2)&amp;nbsp;Alternatively, you can roll your own approach (use batch file, etc...) which I won't go into detail here.&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50 dir=ltr&gt;For most .Net created apps, the .Net 2.0 framework is the only dependency you have.&amp;nbsp;&amp;nbsp; However&amp;nbsp;if you use InteropForms (rather than Interop Usercontrols) you take an a dependency on a binary called the "Microsoft.InteropFormTools.dll".&amp;nbsp;&amp;nbsp; You also have&amp;nbsp;this dependency by default if you&amp;nbsp;create an Interop UserControl project, although you can&amp;nbsp;safely remove it unless you explicity&amp;nbsp;want to use some of the objects in this assembly.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;We have bundled this file in a redist package and created a bootstrapper package so you can safely and securely deploy this binary just like you would with the .Net framework.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50 dir=ltr&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50 dir=ltr&gt;Lastly, if your Interop project has any extra 3rd party dependencies, you'll need to ensure those are appropriately installed.&amp;nbsp;&amp;nbsp; If you want, you can create your own bootstrapper package for them and have the VS bootstrapper take care of installing them for you.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;EM&gt;Resources:&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Creating a custom bootstrapper:&amp;nbsp; Check out the "How To: Deploy a Hybrid Application" topic in the Interop Forms Toolkit documentation.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Creating a bootstrapper package:&amp;nbsp;&amp;nbsp; Check out these links:&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/aa730839(VS.80).aspx"&gt;http://msdn2.microsoft.com/en-us/library/aa730839(VS.80).aspx&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;A href="http://blogs.msdn.com/chrsmith/articles/Using_the_Bootstrapper_to_wrap_a_Windows_Installer_package.aspx"&gt;http://blogs.msdn.com/chrsmith/articles/Using_the_Bootstrapper_to_wrap_a_Windows_Installer_package.aspx&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Actually, there's a great tool that David Guyer created to allow you to visually create both a custom bootstrapper or a bootstrapper package.&amp;nbsp;&amp;nbsp; I highly recommend it.&amp;nbsp;&amp;nbsp; You can download it (via ClickOnce!) here:&lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;A href="http://www.codeplex.com/bmg"&gt;http://www.codeplex.com/bmg&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;2) Registering the Controls with Reg-Free COM:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Registration free COM is a cool technology that works in Windows XP and later operating systems that allows you to deploy COM-based binaries without having to register them.&amp;nbsp; If you can be sure that your clients will be on this platform or later, then it can make your deployment story much easier if you use Interop UserControls.&amp;nbsp;&amp;nbsp; As I mentioned above, the only thing you need to add to legacy application is add your new usercontrol assembly and an application manifest file to your application and copy those files to the application directory and you're done.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;If you use InteropForms projects&amp;nbsp;(or say you have to support older platforms like Windows 98 or Windows 2000), this approach won't work and you'll need to use regasm (or a windows .msi) to deploy your assemblies which is more difficult, but still quite doable.&amp;nbsp;&amp;nbsp; If you use InteropForms projects, probably the easiest way to deploy them is in this manner:&lt;/DIV&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;1) Create a VS Setup and Deployment project and add your InteropForms assembly to it.&amp;nbsp;&amp;nbsp; Also, make sure you set the register property to vsdraCOM so that will get globally registered on the machine and build your .msi&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;2) Create a bootstrapper package for this .msi and then add this package to your custom bootstrapper.&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Interop UserControls projects cannot be deployed this way b/c they rely on some additional code to get run to register them properly (check out the code in the method with the DllRegisterFunction() attribute), so you need to use regasm.exe&amp;nbsp;directly if you want to deploy them and cannot use reg-free COM.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Note:&amp;nbsp; If you do need to use regasm.exe, what I find to be the best approach is to create an .msi like above, but use a custom action to register/unregister the assembles.&amp;nbsp;&amp;nbsp; The good news is that we've shipped the code to do this and you can just borrow what we have.&amp;nbsp;&amp;nbsp; Look in the source.zip file in the installation folder and check out the "bootstrapperpackageinstaller" project for details.&amp;nbsp;&amp;nbsp; In the "How to: Deploy a Hybrid Application" in the Interop Forms documentation, we also mention that you can ship regasm.exe in your installer, although I would recommend using the code that we ship (which searches for and finds the right copy of regasm.exe installed locally).&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;EM&gt;Resources:&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Search MSDN for "vsdraCOM" and you'll get a bunch of information around this.&amp;nbsp;&amp;nbsp; Also, check out the links mentioned above for more information on bootstrapper information.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;3) Your existing setup:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Part of the choosing of the best way to deploy your application comes from what you can do with your existing setup.&amp;nbsp; Here's the common scenarios and what we recommend.&lt;/DIV&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;a) Your&amp;nbsp;setup is frozen (or you cannot modify it).&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;In this case, you can create a custom bootstrapper to install all prereqs that your application needs (whatever component you created in (2) above).&amp;nbsp;&amp;nbsp; You will end up with a single setup.exe which will launch and setup everything the application needs.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;b) Your&amp;nbsp;setup is a windows .msi file created in VS.&amp;nbsp;&amp;nbsp; In this case, you can just add the appropriate logic for installing your assembly (see (2) above) and you can just goto the Prerequisites dialog for the setup project and rebuild your .msi.&amp;nbsp;&amp;nbsp; VS will create a custom bootstrapper (the setup.exe) that installs all needed prerequisites.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;c) Your setup is created with the VB6 package and deployment wizard or some other technology and you can modify it.&amp;nbsp;&amp;nbsp; Depending on (1) above - namely, if you need to install prerequisites, you&amp;nbsp;might want to create a&amp;nbsp;custom bootstrapper to "wrap" your legacy setup.&amp;nbsp;&amp;nbsp; Depending on (2), you can either just add your files to your setup (if you use RegFree&amp;nbsp;COM and Interop Usercontrols), or can do something custom for your setup.&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Resources:&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&lt;A href="http://blogs.msdn.com/chrsmith/articles/Using_the_Bootstrapper_to_wrap_a_Windows_Installer_package.aspx"&gt;http://blogs.msdn.com/chrsmith/articles/Using_the_Bootstrapper_to_wrap_a_Windows_Installer_package.aspx&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Anyway, I hope that helps clear up any confusion around deploying hybrid applications.&amp;nbsp;&amp;nbsp; If you run into questions/issues feel free to ask questions &lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=879&amp;amp;SiteID=1"&gt;here&lt;/A&gt; and we'll do our best to help you out.&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Also we'll be doing a webcast with demos and some Q&amp;amp;A on June 6th, you can register for it here: &lt;A href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032337474&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032337474&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Good luck!&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;Toddap_MS&lt;/DIV&gt;
&lt;DIV class=ExternalClassA5FE57680D7B44F58E5A062B55282A50&gt;&amp;nbsp;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3088001" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx">VB6_Migration/Interop</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/Todd+Apley/default.aspx">Todd Apley</category></item></channel></rss>