<?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 : VB6_Migration/Interop</title><link>http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx</link><description>Tags: VB6_Migration/Interop</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>PInvoke Interop Assistant on CodePlex (Jared Parsons)</title><link>http://blogs.msdn.com/vbteam/archive/2008/06/20/pinvoke-interop-assistant-on-codeplex.aspx</link><pubDate>Fri, 20 Jun 2008 19:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8625741</guid><dc:creator>VBTeam</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/8625741.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=8625741</wfw:commentRss><description>&lt;P&gt;I'm happy to announce that the &lt;A href="http://blogs.msdn.com/vbteam/archive/2008/03/14/making-pinvoke-easy.aspx" mce_href="http://blogs.msdn.com/vbteam/archive/2008/03/14/making-pinvoke-easy.aspx"&gt;PInvoke Interop Assistant&lt;/A&gt; tool is now available on CodePlex.&amp;nbsp; This includes the binaries, source code and the dev authored unit tests.&amp;nbsp; 
&lt;P&gt;It is hosted on the more general CLR Interop Tools page.&amp;nbsp; 
&lt;P&gt;&lt;A href="http://www.codeplex.com/clrinterop" mce_href="http://www.codeplex.com/clrinterop"&gt;http://www.codeplex.com/clrinterop&lt;/A&gt; 
&lt;P&gt;I will be actively maintaining this tool in the future and (hopefully) adding more features.&amp;nbsp; There were several features we cut just before release due to QA costing that I would like to add back (including VS integration, wrapper functions).&amp;nbsp;&amp;nbsp; 
&lt;P&gt;Please post any suggestions you have for the tool on the site and we will definitely consider them. &lt;/P&gt;
&lt;P&gt;Jared Parsons&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/jaredpar" mce_href="http://blogs.msdn.com/jaredpar"&gt;http://blogs.msdn.com/jaredpar&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8625741" 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/Jared+Parsons/default.aspx">Jared Parsons</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/Did+you+know_3F00_/default.aspx">Did you know?</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/PInvoke/default.aspx">PInvoke</category></item><item><title>Improvements to Visual Basic 6 Runtime Support on Vista, Windows Server 2008 (by Paul Yuknewicz)</title><link>http://blogs.msdn.com/vbteam/archive/2008/03/15/improvements-to-visual-basic-6-runtime-support-on-vista-windows-server-2008-by-paul-yuknewicz.aspx</link><pubDate>Sat, 15 Mar 2008 23:46:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8236657</guid><dc:creator>VBTeam</dc:creator><slash:comments>15</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/8236657.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=8236657</wfw:commentRss><description>&lt;p&gt;You probably didn&amp;#8217;t notice it, but we made some important and beneficial changes to the &lt;a href="http://msdn2.microsoft.com/en-us/vbrun/ms788708.aspx"&gt;Support Statement for Visual Basic 6.0 on Windows Vista and Windows Server 2008&lt;/a&gt; just a few weeks ago, and I want to share the good news. &lt;/p&gt;  &lt;p&gt;First, just like Vista, the Visual Basic 6 runtime is officially supported on Windows Server 2008.&lt;/p&gt;  &lt;p&gt;Second, we have expanded the list of ActiveX controls that are officially supported as part of Vista and Windows Server 2008. &lt;/p&gt;  &lt;p&gt;For background, when we first announced over a year ago that the Visual Basic 6.0 applications would &amp;#8220;just work&amp;#8221; on Windows Vista, many of you pointed out there were a number of widely used ActiveX controls, such as comctl32.ocx and richtx32.ocx, listed as &amp;#8220;tested but not shipping.&amp;#8221; That basically means they aren&amp;#8217;t supported on Vista, even though they are important pieces of many Visual Basic 6 applications. So the Visual Basic team spent the last year-plus talking with product teams all over Microsoft and offered to take over the code base for those components so we could support them. Now, we&amp;#8217;re pleased to announce that we have added support for a number of controls and components commonly used in VB6 apps, and identified compatible upgrades for some less commonly used controls.&lt;/p&gt;  &lt;p&gt;To summarize we hope these improvements will make you even more successful in preserving your VB6 assets.&amp;#160; This should provide some peace of mind as you think about moving forward gradually to VB.NET, the most used MS .NET language, in VS2008 and future versions.&amp;#160; &lt;/p&gt;  &lt;p&gt;Best,&lt;/p&gt;  &lt;p&gt;Paul Yuknewicz&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8236657" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vbteam/archive/tags/Paul+Yuknewicz/default.aspx">Paul Yuknewicz</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx">VB6_Migration/Interop</category></item><item><title>Making PInvoke Easy</title><link>http://blogs.msdn.com/vbteam/archive/2008/03/14/making-pinvoke-easy.aspx</link><pubDate>Fri, 14 Mar 2008 19:56:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8206410</guid><dc:creator>VBTeam</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/8206410.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=8206410</wfw:commentRss><description>&lt;p&gt;Jared here again.&amp;nbsp; &lt;/p&gt; &lt;p&gt;I very excited to announce we recently released a tool I've been working on to MSDN that will greatly help with using PInvoke in managed code.&amp;nbsp; The tool is called the "PInvoke Interop Assistant" and is included as part of a MSDN article on marshalling data for PInvoke and Reverse PInvoke scenarios.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Here is a link to the article and tool&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Article: &lt;a title="http://msdn2.microsoft.com/en-us/magazine/cc164193.aspx" href="http://msdn2.microsoft.com/en-us/magazine/cc164193.aspx"&gt;http://msdn2.microsoft.com/en-us/magazine/cc164193.aspx&lt;/a&gt;  &lt;li&gt;Tool: &lt;a title="CLRInsideOut2008_01.exe" href="http://download.microsoft.com/download/f/2/7/f279e71e-efb0-4155-873d-5554a0608523/CLRInsideOut2008_01.exe"&gt;CLRInsideOut2008_01.exe&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The motivation behind this tool is writing PInvoke is a hard and often tedious task. There are many rules you must obey and many exceptions that must be taken into account.&amp;nbsp; Anything beyond simple data structures gets very involved and subtle semantics of C can greatly change the needed signature.&amp;nbsp; Incorrect translations often result in obscure exceptions or crashes.&lt;/p&gt; &lt;p&gt;In short, it's not any fun. &lt;/p&gt; &lt;p&gt;The tool works in several different ways to make PInvoke generation an easier process.&amp;nbsp; The goal is to make generating managed code for structs, unions, enums, constants, functions, typedefs , etc ... as easy as possible. The resulting code can be generated in both VB and C#. &lt;/p&gt; &lt;p&gt;The GUI version of the tool operates in 3 modes.&amp;nbsp;&amp;nbsp; &lt;/p&gt; &lt;ol&gt; &lt;li&gt;SigImp Search: Search for a commonly used function and translate it into managed code.&lt;/li&gt; &lt;li&gt;SigImp Translate Snippet: Directly translate C code into managed PInvoke signatures.&lt;/li&gt; &lt;li&gt;SigExp: Convert managed binaries into C++ Reverse PInvoke scenarios&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;The first two are the parts I worked on and represent the PInvoke scenarios.&amp;nbsp; The third part was written by Ladi Prosek and will be covered in a different article. We chose the names SigImp and SigExp to mirror the tblimp/tlbexp tool base since they have similar functions.&lt;/p&gt; &lt;h3&gt;Directly translating C code into PInvoke Signatures&lt;/h3&gt; &lt;p&gt;Most adventures in PInvoke start with a developer having a small set of C code they would like to use from a managed binary.&amp;nbsp; Typically it's one or two functions with several supporting C structs.&amp;nbsp; Before, all of this would be hand translated into managed code from scratch.&amp;nbsp; With this tool all you must do is paste the code into the tool and it will generate the interop signature for you.&amp;nbsp; &lt;/p&gt; &lt;p&gt;For instance assume you wanted to translate the following C code into VB.&amp;nbsp; &lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;struct&lt;/span&gt; S1
{
  &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; a;
  &lt;span style="color: rgb(0,0,255)"&gt;char&lt;/span&gt;[10] b;
};

&lt;span style="color: rgb(0,0,255)"&gt;float&lt;/span&gt; CalculateData(S1* p);&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Start up the tool and switch to the "SigImp Translate Snippet" tab.&amp;nbsp; Then paste the code in and then hit the Generate button.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vbteam/WindowsLiveWriter/MakingPInvokeEasy_E069/PInvoke1_4.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="157" alt="PInvoke1" src="http://blogs.msdn.com/blogfiles/vbteam/WindowsLiveWriter/MakingPInvokeEasy_E069/PInvoke1_thumb_1.png" width="244" border="0"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can also set click the "Auto Generate" box and watch the code update as you type.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;This translation is not limited to built-in C types.&amp;nbsp; It will also resolve most commonly used windows types such as HANDLE, DWORD all the way up to complex structs such as &lt;a href="http://msdn2.microsoft.com/en-us/library/aa365740(VS.85).aspx"&gt;WIN32_FIND_DATA&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Searching for a commonly used function&lt;/h3&gt;
&lt;p&gt;Often developers want to use C functions familiar to them in managed code.&amp;nbsp; This can be a tedious task as well because if the signature is not already available you are back to coding from scratch.&amp;nbsp; Even adding a constant value can be tricky if you don't know which header file to look in.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;The tool also provides a database of many commonly used functions, structs, constants, etc ... It is essentially anything that is included from windows.h.&amp;nbsp; Switch to the SigImp search tab, type the name of what you are looking for and hit generate.&amp;nbsp; For example if I want to see the value for WM_PAINT just type it in.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vbteam/WindowsLiveWriter/MakingPInvokeEasy_E069/Pinvoke2_2.png" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="157" alt="Pinvoke2" src="http://blogs.msdn.com/blogfiles/vbteam/WindowsLiveWriter/MakingPInvokeEasy_E069/Pinvoke2_thumb.png" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;In addition this part of the tool will also do dependency calculation.&amp;nbsp; For instance if choose a method which has a parameter that is a C structure it will automatically generate the structure with the function.&amp;nbsp; For instance if you choose the function &lt;a href="http://msdn2.microsoft.com/en-us/library/aa364418.aspx"&gt;FindFirstFile&lt;/a&gt; it will determine that the function depends on the WIN32_FIND_DATA structure.&amp;nbsp; Furthermore it will notice that WIN32_FIND_DATA depends on FILETIME and generate both in addition to the method.&lt;/p&gt;&lt;pre class="code"&gt;&amp;lt;System.Runtime.InteropServices.StructLayoutAttribute( _
    System.Runtime.InteropServices.LayoutKind.Sequential, _
    CharSet:=System.Runtime.InteropServices.CharSet.[Unicode])&amp;gt; _
&lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Structure&lt;/span&gt; WIN32_FIND_DATAW
    &lt;span style="color: rgb(0,128,0)"&gt;'''DWORD-&amp;gt;unsigned int
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; dwFileAttributes &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;UInteger
&lt;/span&gt;    &lt;span style="color: rgb(0,128,0)"&gt;'''FILETIME-&amp;gt;_FILETIME
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; ftCreationTime &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; FILETIME
    &lt;span style="color: rgb(0,128,0)"&gt;'''FILETIME-&amp;gt;_FILETIME
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; ftLastAccessTime &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; FILETIME
    &lt;span style="color: rgb(0,128,0)"&gt;'''FILETIME-&amp;gt;_FILETIME
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; ftLastWriteTime &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; FILETIME
    &lt;span style="color: rgb(0,128,0)"&gt;'''DWORD-&amp;gt;unsigned int
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; nFileSizeHigh &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;UInteger
&lt;/span&gt;    &lt;span style="color: rgb(0,128,0)"&gt;'''DWORD-&amp;gt;unsigned int
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; nFileSizeLow &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;UInteger
&lt;/span&gt;    &lt;span style="color: rgb(0,128,0)"&gt;'''DWORD-&amp;gt;unsigned int
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; dwReserved0 &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;UInteger
&lt;/span&gt;    &lt;span style="color: rgb(0,128,0)"&gt;'''DWORD-&amp;gt;unsigned int
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; dwReserved1 &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;UInteger
&lt;/span&gt;    &lt;span style="color: rgb(0,128,0)"&gt;'''WCHAR[260]
&lt;/span&gt;    &amp;lt;System.Runtime.InteropServices.MarshalAsAttribute( _
        System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=260)&amp;gt; _
    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; cFileName &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;String
&lt;/span&gt;    &lt;span style="color: rgb(0,128,0)"&gt;'''WCHAR[14]
&lt;/span&gt;    &amp;lt;System.Runtime.InteropServices.MarshalAsAttribute( _
        System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=14)&amp;gt; _
    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; cAlternateFileName &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;String
End&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Structure

&lt;/span&gt;&amp;lt;System.Runtime.InteropServices.StructLayoutAttribute( _
    System.Runtime.InteropServices.LayoutKind.Sequential)&amp;gt; _
&lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Structure&lt;/span&gt; FILETIME
    &lt;span style="color: rgb(0,128,0)"&gt;'''DWORD-&amp;gt;unsigned int
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; dwLowDateTime &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;UInteger
&lt;/span&gt;    &lt;span style="color: rgb(0,128,0)"&gt;'''DWORD-&amp;gt;unsigned int
&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; dwHighDateTime &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;UInteger
End&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Structure

Partial&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Class&lt;/span&gt; NativeMethods
    &lt;span style="color: rgb(0,128,0)"&gt;'''Return Type: HANDLE-&amp;gt;void*
&lt;/span&gt;    &lt;span style="color: rgb(0,128,0)"&gt;'''lpFileName: LPCWSTR-&amp;gt;WCHAR*
&lt;/span&gt;    &lt;span style="color: rgb(0,128,0)"&gt;'''lpFindFileData: LPWIN32_FIND_DATAW-&amp;gt;_WIN32_FIND_DATAW*
&lt;/span&gt;    &amp;lt;System.Runtime.InteropServices.DllImportAttribute(&lt;span style="color: rgb(163,21,21)"&gt;"kernel32.dll"&lt;/span&gt;, EntryPoint:=&lt;span style="color: rgb(163,21,21)"&gt;"FindFirstFileW"&lt;/span&gt;)&amp;gt; _
    &lt;span style="color: rgb(0,0,255)"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Shared&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Function&lt;/span&gt; FindFirstFileW( _
        &amp;lt;System.Runtime.InteropServices.InAttribute(), _
            System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPWStr)&amp;gt; _
            &lt;span style="color: rgb(0,0,255)"&gt;ByVal&lt;/span&gt; lpFileName &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;String&lt;/span&gt;, _
        &amp;lt;System.Runtime.InteropServices.OutAttribute()&amp;gt; _
        &lt;span style="color: rgb(0,0,255)"&gt;ByRef&lt;/span&gt; lpFindFileData &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; WIN32_FIND_DATAW) &lt;span style="color: rgb(0,0,255)"&gt;As&lt;/span&gt; System.IntPtr
    &lt;span style="color: rgb(0,0,255)"&gt;End&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Function
End&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;Class&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;h3&gt;Translating Large Code bases&lt;/h3&gt;
&lt;p&gt;The snippet translator works well for small snippets of code.&amp;nbsp; If you are trying to translate a much larger code base, say several interdependent header files the small snippet dialog won't work well.&amp;nbsp; To work with larger code bases you should use the command line version of the tool;&amp;nbsp; sigimp.exe.&amp;nbsp; It is designed to process several header files and produce a mass output.&amp;nbsp; &lt;/p&gt;
&lt;h3&gt;Wrapping Up&lt;/h3&gt;
&lt;p&gt;This tool started out as a pet project of mine some time ago.&amp;nbsp; I'm extremely excited that customers are now going to be able to take advantage of it and I greatly look forward to any feedback you have.&amp;nbsp; I will post a couple more articles in the future detailing how this tool works under the hood.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Jared Parsons&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/jaredpar"&gt;http://blogs.msdn.com/jaredpar&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8206410" 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/Jared+Parsons/default.aspx">Jared Parsons</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/Did+you+know_3F00_/default.aspx">Did you know?</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/PInvoke/default.aspx">PInvoke</category></item><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>Petzold Chapter 3 (Young Joo)</title><link>http://blogs.msdn.com/vbteam/archive/2007/11/04/petzold-chapter-3.aspx</link><pubDate>Mon, 05 Nov 2007 09:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5901790</guid><dc:creator>VBTeam</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/5901790.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=5901790</wfw:commentRss><description>&lt;P&gt;I am Young Joo, PM @ VB team.&amp;nbsp; I will be helping out Patrick on converting samples in Charles Petzold's WPF book (Applications = Code + Markup) to Visual Basic.&amp;nbsp; This is an exciting project and I hope you enjoy this as much as I do.&amp;nbsp; Another exciting news is that we have an extra help for this project.&amp;nbsp; Evan Lim who currently teaches WPF &amp;amp; Blend courses at Foothill Community College in Los Altos, CA, has decided to help us with this.&amp;nbsp; He already has a lot of chapters converted.&amp;nbsp; So we will be able to release them much more quickly.&lt;/P&gt;
&lt;P&gt;Attached is VB sample for chapter 3.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5901790" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/vbteam/attachment/5901790.ashx" length="15996" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/vbteam/archive/tags/Young+Joo/default.aspx">Young Joo</category><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/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/SMB/default.aspx">SMB</category></item><item><title>Continued search for Small Business Developers and Chapter 2 of Petzold's book (finally!)</title><link>http://blogs.msdn.com/vbteam/archive/2007/10/13/continued-search-for-small-business-developers-and-chapter-2-of-petzold-s-book-finally.aspx</link><pubDate>Sat, 13 Oct 2007 18:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5442763</guid><dc:creator>VBTeam</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/5442763.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=5442763</wfw:commentRss><description>&lt;P&gt;I've attached the chapter 2 Visual Basic.NET&amp;nbsp;code for the ongoing project of converting Peztold's &lt;U&gt;Applications = Code + Markup&lt;/U&gt; book on WPF proramming.&amp;nbsp; I am happy to say that Young from my team is going to help with this effort so you will see these chapters coming out more frequently.&lt;/P&gt;
&lt;P&gt;Also, we are about to close the doors on our intial sweep of bringing in our fellow small business developers to help us shape Visual Basic.&amp;nbsp; As a note, I should mention that if you or someone you know is still using VB6 or has switched to another technology, we are very intersted in talking with you.&amp;nbsp;&amp;nbsp;A few links are included here.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;If you are a consultant/small business developer (and that is really anyone out there who writes software for small businesses) please use the following sign up sheet: &lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;A href="https://www.microsoft.com/usability/enrollment.htm" mce_href="https://www.microsoft.com/usability/enrollment.htm"&gt;&lt;FONT color=#0000ff&gt;https://www.microsoft.com/usability/enrollment.htm&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If you are an IT developer who builds departmental level applications, please sign up here:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;A href="https://www.microsoft.com/usability/enrollment_ITPros.htm" mce_href="https://www.microsoft.com/usability/enrollment_ITPros.htm"&gt;&lt;FONT color=#0000ff&gt;https://www.microsoft.com/usability/enrollment_ITPros.htm&lt;/FONT&gt;&lt;/A&gt;. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;And &lt;STRONG&gt;most importantly&lt;/STRONG&gt;, if you are in the puget sound area, after signing up, please email &lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;A href="mailto:uccoord@microsoft.com" mce_href="mailto:uccoord@microsoft.com"&gt;&lt;FONT color=#0000ff&gt;uccoord@microsoft.com&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;and cc' myself &lt;A href="mailto:patd@microsoft.com" mce_href="mailto:patd@microsoft.com"&gt;patd@microsoft.com&lt;/A&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman'"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5442763" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/vbteam/attachment/5442763.ashx" length="88098" type="application/x-zip-compressed" /><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/Patrick+Dengler/default.aspx">Patrick Dengler</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/SMB/default.aspx">SMB</category></item><item><title>Microsoft Visual Basic 2005 Power Packs 2.0 now available</title><link>http://blogs.msdn.com/vbteam/archive/2007/08/24/microsoft-visual-basic-2005-power-packs-2-0-now-available.aspx</link><pubDate>Sat, 25 Aug 2007 03:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4550578</guid><dc:creator>VBTeam</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/4550578.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=4550578</wfw:commentRss><description>&lt;P&gt;In case you didn't see the &lt;A class="" title=links href="http://msdn2.microsoft.com/en-us/vbasic/bb735936.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/vbasic/bb735936.aspx"&gt;links&lt;/A&gt; go live on the &lt;A class="" title="Visual Basic Developer Center" href="http://msdn2.microsoft.com/en-us/vbasic/default.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/vbasic/default.aspx"&gt;Visual Basic Developer Center&lt;/A&gt; the VB Off-Cycle team has shipped the latest &lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;edition &lt;/SPAN&gt;of the &lt;A class="" href="http://msdn2.microsoft.com/en-us/vbasic/bb735936.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/vbasic/bb735936.aspx"&gt;Power Pack controls&lt;/A&gt;.&amp;nbsp; You can download them from&amp;nbsp;&lt;A class="" href="http://msdn2.microsoft.com/en-us/vbasic/bb735936.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/vbasic/bb735936.aspx"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;In this update we've added the much anticipated Line and Shape controls.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;IMG alt="" src="http://msdn2.microsoft.com/en-us/vbasic/bb735936.01.jpg" border=0&gt;&lt;/P&gt;
&lt;P&gt;The line and shape controls give you drag and drop ease at design time and great performance at runtime.&amp;nbsp; By simply setting a few properties you can accomplish complex gradient fills.&amp;nbsp; An improvement over the VB6 version of Line and Shape is we've added support for Events.&amp;nbsp; These are fully supported by Microsoft as part of your Visual Basic support agreement, and will likely be rolled into the product in future releases.&amp;nbsp; Remember if you have ideas for future Power Packs go to the &lt;SPAN&gt;&lt;A class="" title="Visual Basic 2005 Power Pack Suggestion Center" href="http://connect.microsoft.com/vbasic" target=_blank mce_href="http://connect.microsoft.com/vbasic"&gt;Visual Basic 2005 Power Pack Suggestion Center&lt;/A&gt;&amp;nbsp;and let us know about it.&amp;nbsp; You can log new idea or &lt;A class="" title=vote href="https://connect.microsoft.com/vbasic/feedback" target=_blank mce_href="https://connect.microsoft.com/vbasic/feedback"&gt;vote&lt;/A&gt; for ones already there.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This release also includes updates to the&amp;nbsp;PrintForm component and the Printer Compatibility Library. We also include a bootstrapper package in this release, something I am especially excited about because I am also responsible for ClickOnce experience in Visual Studio, and having a bootstrapper mean you only need to check a box to &lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;redistribute &lt;/SPAN&gt;the Power Packs with your application.&lt;/P&gt;
&lt;P&gt;Have fun, and send me pictures of any cool things you do with the new controls.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;-Scott&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4550578" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB2005/default.aspx">VB2005</category><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/Power+Packs/default.aspx">Power Packs</category></item><item><title>Visual Basic on Channel9 (Beth Massi)</title><link>http://blogs.msdn.com/vbteam/archive/2007/07/21/visual-basic-on-channel9-beth-massi.aspx</link><pubDate>Sat, 21 Jul 2007 20:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3991644</guid><dc:creator>VBTeam</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/3991644.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=3991644</wfw:commentRss><description>&lt;P&gt;I just posted a couple screen casts/interviews on Channel9 you should definitely check out. I rounded up VB team members and influentials and asked them what their favorite Visual Studio 2008 features were and to give us all a demo of them! &lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://channel9.msdn.com/Showpost.aspx?postid=327367" target=_blank mce_href="http://channel9.msdn.com/Showpost.aspx?postid=327367"&gt;The first one is with Erik Meijer and he shows us his favorite feature, XML Literals:&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In this in interview Erik Meijer, an Architect on the Data Programmability team, shows us how LINQ to XML works in the next version of Visual Basic, 9.0. He talks about some of the history behind the features as well as how XML literals, unique to Visual Basic, are implemented. He takes us on an adventure on how to efficiently work with XML using XML Intellisense and an Office Open XML Excel document, pointing out a lot of tid-bits of information along the way that only Erik could show us. &lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://channel9.msdn.com/ShowPost.aspx?PostID=327369" target=_blank mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=327369"&gt;&amp;nbsp;The next one is with Jonathan Aneja and he shows us the Interop Forms Toolkit 2.0:&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;﻿In this in interview Jonathan Aneja, a Program Manager on the Visual Basic team, shows us how the Interop Forms Toolkit 2.0 helps you migrate your existing VB 6 applications one form at a time to .NET. He gives us insight on how we can write .NET user controls and forms to take advantage of the .NET framework but still run within our VB 6 applications. He shows us a demo where he creates a .NET user control which uses LINQ to SQL features and then shows it running inside a VB 6 form. &lt;/P&gt;
&lt;P&gt;I suggest watching them full screen for easier viewing of the demos. More will be coming soon so stay tuned! Enjoy!&lt;/P&gt;
&lt;P&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;, VS Community&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3991644" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vbteam/archive/tags/LINQ_2F00_VB9/default.aspx">LINQ/VB9</category><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/VB2008/default.aspx">VB2008</category></item><item><title>Slide deck for Interop Toolkit Webcast</title><link>http://blogs.msdn.com/vbteam/archive/2007/06/06/slide-deck-for-interop-toolkit-webcast.aspx</link><pubDate>Thu, 07 Jun 2007 03:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3129319</guid><dc:creator>VBTeam</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/3129319.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=3129319</wfw:commentRss><description>&lt;P&gt;Thanks to everyone who was able to make it out for this morning's webcast.&amp;nbsp; We covered how to use the Interop&amp;nbsp;Toolkit 2.0 to upgrade VB6 applications to VB.NET, how to deploy hybrid applications, and finally we touched on some other great interop resources available on MSDN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;As promised the slide deck's available below, and here's the list of important links:&lt;/P&gt;
&lt;P&gt;VBRun - &lt;A href="http://msdn.microsoft.com/vbrun"&gt;http://msdn.microsoft.com/vbrun&lt;/A&gt;&lt;BR&gt;Interop &amp;amp; Upgrade Forum - &lt;A href="http://forums.microsoft.com/msdn/showforum.aspx?forumid=879"&gt;http://forums.microsoft.com/msdn/showforum.aspx?forumid=879&lt;/A&gt; &lt;BR&gt;Interop Forms Toolkit 2.0 - &lt;A href="http://msdn2.microsoft.com/en-us/vbasic/bb419144.aspx"&gt;http://msdn2.microsoft.com/en-us/vbasic/bb419144.aspx&lt;/A&gt;&lt;BR&gt;VB PowerPack Team - &lt;A href="mailto:vbpwrpk@microsoft.com"&gt;vbpwrpk@microsoft.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Additionally, check out the VB Fusion site to learn how to &lt;A onclick="javascript:Track('ctl00_ctl01|ctl00_ctl03',this);" href="http://msdn.microsoft.com/library/en-us/dv_vstechart/html/vb5000cl.asp"&gt;Use 5000 Classes from VB6&lt;/A&gt;, &lt;A class="" title="Use SQL Express from VB6" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/ussqlexpvb6.asp" mce_href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/ussqlexpvb6.asp"&gt;Use SQL Express from VB6&lt;/A&gt;, and even &lt;A onclick="javascript:Track('ctl00_ctl01|ctl00_ctl10',this);" href="http://msdn.microsoft.com/library/en-us/dv_vstechart/html/vbfusionbt.asp"&gt;implement multithreading using the BackgroundWorker&lt;/A&gt;!&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3129319" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/vbteam/attachment/3129319.ashx" length="488960" type="application/vnd.ms-powerpoint" /><category domain="http://blogs.msdn.com/vbteam/archive/tags/Jonathan+Aneja/default.aspx">Jonathan Aneja</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB2005/default.aspx">VB2005</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx">VB6_Migration/Interop</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><item><title>So what does ComClass actually do?</title><link>http://blogs.msdn.com/vbteam/archive/2007/06/01/so-what-does-lt-comclass-gt-actually-do.aspx</link><pubDate>Sat, 02 Jun 2007 05:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3034821</guid><dc:creator>VBTeam</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/3034821.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=3034821</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;I came across a &lt;/FONT&gt;&lt;A href="http://www.codeproject.com/useritems/VB6InteropToolkit2.asp" mce_href="http://www.codeproject.com/useritems/VB6InteropToolkit2.asp"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;really cool article&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; yesterday by James Ashley, which shows some of the cool things you can do with the &lt;/FONT&gt;&lt;A href="http://go.microsoft.com/?linkid=6886417" mce_href="http://go.microsoft.com/?linkid=6886417"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;Interop Forms Toolkit 2.0&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;.&amp;nbsp;&amp;nbsp; The three VB6 examples cover consuming a WebService (complete with a Dilbert icon showing up in the VB6 toolbox!), implementing multithreading using the BackgroundWorker component, and last but not least a cool WPF cube.&amp;nbsp; &amp;nbsp;Best of all there’s tons of code samples and &amp;nbsp;no less than *&lt;B&gt;15&lt;/B&gt;* screenshots!&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Along with the samples there’s also some C# translations of the templates that ship with the Interop Toolkit.&amp;nbsp; While playing with these templates I was reminded of some of the subtle differences in how the VB and C# compilers handle COM Interop.&amp;nbsp; The biggest difference is in how they handle the ComClass attribute, which we’ll see by looking at some code:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;event&lt;/SPAN&gt; System.&lt;SPAN style="COLOR: teal"&gt;EventHandler&lt;/SPAN&gt; ButtonClicked;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; button1_Click(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; sender, System.&lt;SPAN style="COLOR: teal"&gt;EventArgs&lt;/SPAN&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;!=&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.ButtonClicked)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.ButtonClicked.Invoke(&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;, e);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Event&lt;/SPAN&gt; ButtonClicked &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; System.EventHandler&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Sub&lt;/SPAN&gt; Button1_Click(&lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; sender &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; System.Object, &lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; e &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; System.EventArgs) &lt;SPAN style="COLOR: blue"&gt;Handles&lt;/SPAN&gt; Button1.Click&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;RaiseEvent&lt;/SPAN&gt; ButtonClicked(&lt;SPAN style="COLOR: blue"&gt;Me&lt;/SPAN&gt;, e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;In both cases we’re exposing a public event, and invoking it when the button is clicked.&amp;nbsp; By using &lt;/FONT&gt;&lt;A href="http://www.aisto.com/roeder/dotnet/" mce_href="http://www.aisto.com/roeder/dotnet/"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;Reflector&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;, let’s look at what gets generated under the covers:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;[&lt;A title="Microsoft.VisualBasic.ComClassAttribute.ComClassAttribute(string, string, string);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.VisualBasic:8.0.0.0:b03f5f7f11d50a3a/Microsoft.VisualBasic.ComClassAttribute/.ctor(String,String,String)" mce_href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.VisualBasic:8.0.0.0:b03f5f7f11d50a3a/Microsoft.VisualBasic.ComClassAttribute/.ctor(String,String,String)"&gt;&lt;SPAN style="TEXT-DECORATION: none; text-underline: none"&gt;ComClass&lt;/SPAN&gt;&lt;/A&gt;(&lt;SPAN style="COLOR: maroon"&gt;"c6cbbae7-44b8-422e-840f-cbaba8e3238c"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: maroon"&gt;"bf3ef778-6ca7-4ec8-a045-87be56528803"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: maroon"&gt;"37b0d42a-6740-45ec-adc6-38fcbcdc48e4"&lt;/SPAN&gt;)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1000a0; FONT-FAMILY: 'Courier New'"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: #1000a0"&gt;class&lt;/SPAN&gt; &lt;A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://CSharpControl:1.0.2708.29278/CSharpControl.InteropUserControl" mce_href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://CSharpControl:1.0.2708.29278/CSharpControl.InteropUserControl"&gt;&lt;SPAN style="COLOR: black; TEXT-DECORATION: none; text-underline: none"&gt;InteropUserControl&lt;/SPAN&gt;&lt;/A&gt; : &lt;A title=System.Windows.Forms.UserControl href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:b77a5c561934e089/System.Windows.Forms.UserControl" mce_href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:b77a5c561934e089/System.Windows.Forms.UserControl"&gt;&lt;SPAN style="TEXT-DECORATION: none; text-underline: none"&gt;UserControl&lt;/SPAN&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;VB&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;DesignerGenerated(), ComClass(&lt;SPAN style="COLOR: maroon"&gt;"a2ee6169-9a0d-4930-b8bb-ee71307c43b3"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: maroon"&gt;"75ff3d57-6448-40ac-a294-68252180cacd"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: maroon"&gt;"2b04895c-43f8-44b3-b187-00556ef53a6a"&lt;/SPAN&gt;), Guid(&lt;SPAN style="COLOR: maroon"&gt;"a2ee6169-9a0d-4930-b8bb-ee71307c43b3"&lt;/SPAN&gt;), ClassInterface(ClassInterfaceType.None), &lt;B&gt;ComSourceInterfaces(&lt;SPAN style="COLOR: maroon"&gt;"VBControl.InteropUserControl+__InteropUserControl"&lt;/SPAN&gt;)&lt;/B&gt;&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;Public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;Class&lt;/SPAN&gt; InteropUserControl&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Inherits&lt;/SPAN&gt; UserControl&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;B&gt;&lt;SPAN style="COLOR: blue"&gt;Implements&lt;/SPAN&gt; _InteropUserControl&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;…&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;InterfaceType(ComInterfaceType.InterfaceIsIDispatch), Guid(&lt;SPAN style="COLOR: maroon"&gt;"2b04895c-43f8-44b3-b187-00556ef53a6a"&lt;/SPAN&gt;), ComVisible(&lt;SPAN style="COLOR: blue"&gt;True&lt;/SPAN&gt;)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;Public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;Interface&lt;/SPAN&gt; __InteropUserControl&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DispId(1)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Sub&lt;/SPAN&gt; Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DispId(2)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Sub&lt;/SPAN&gt; DblClick()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DispId(3)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Sub&lt;/SPAN&gt; ButtonClicked(&lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; sender &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Object&lt;/SPAN&gt;, &lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; e &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; EventArgs)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;End&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;Interface&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;Guid(&lt;SPAN style="COLOR: maroon"&gt;"75ff3d57-6448-40ac-a294-68252180cacd"&lt;/SPAN&gt;), ComVisible(&lt;SPAN style="COLOR: blue"&gt;True&lt;/SPAN&gt;)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;Public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;Interface&lt;/SPAN&gt; _InteropUserControl&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DispId(1)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Property&lt;/SPAN&gt; Visible() &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Boolean&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DispId(2)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Property&lt;/SPAN&gt; Enabled() &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Boolean&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DispId(3)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Property&lt;/SPAN&gt; ForegroundColor() &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Integer&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DispId(4)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Property&lt;/SPAN&gt; BackgroundColor() &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Integer&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DispId(5)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Property&lt;/SPAN&gt; BackgroundImage() &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; Image&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DispId(6)&amp;gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;Sub&lt;/SPAN&gt; Refresh()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;End&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;Interface&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;End&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="COLOR: blue"&gt;Class&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;The VB compiler has generated two extra interfaces and applied the ComSourceInterfaces attribute to the control, which it knows to do when it sees the ComClass attribute.&amp;nbsp; ComSourceInterfaces is used to link the event sink interface to the class.&amp;nbsp; (&amp;lt;ComClass&amp;gt; actually does a lot more than just making events work automatically, but we'll leave that until another day).&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;What this means is that the VB.NET-compiled event will be visible in VB6, whereas using the C# compiler we’d have to define this interface ourselves.&amp;nbsp; This also means that certain members the template adds like Visible, ForegroundColor, Refresh etc. are automatically exposed by the VB compiler; it’s still possible to do this in C#, it just takes some extra steps.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Both VB and C# offer a lot of powerful features you can use to extend VB6, but it’s important to be aware of the differences, especially when working with events.&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT face=Calibri size=3&gt;For more information on the Interop Toolkit be sure to check out our &lt;/FONT&gt;&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" mce_href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032337474&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;webcast&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; on Wednesday.&amp;nbsp; Also stay tuned to this blog for a series of Interop articles by Todd Apley, one of our QA leads.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Jonathan&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3034821" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vbteam/archive/tags/Jonathan+Aneja/default.aspx">Jonathan Aneja</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB2005/default.aspx">VB2005</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx">VB6_Migration/Interop</category></item><item><title>Just Released - Interop Forms Toolkit 2.0!</title><link>http://blogs.msdn.com/vbteam/archive/2007/05/02/just-released-interop-forms-toolkit-2-0.aspx</link><pubDate>Thu, 03 May 2007 00:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2382649</guid><dc:creator>VBTeam</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/2382649.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=2382649</wfw:commentRss><description>&lt;P&gt;Today we launched the &lt;A class="" title="Interop Forms Toolkit 2.0" href="http://msdn2.microsoft.com/en-us/vbasic/bb419144.aspx" mce_href="http://msdn2.microsoft.com/en-us/vbasic/bb419144.aspx"&gt;Interop Forms Toolkit 2.0&lt;/A&gt;, which makes it easier than ever to upgrade VB6 applications to .NET.&amp;nbsp; This new release builds on &lt;A class="" title="version 1.0" href="http://msdn2.microsoft.com/en-us/vbasic/aa701259.aspx" mce_href="http://msdn2.microsoft.com/en-us/vbasic/aa701259.aspx"&gt;version 1.0&lt;/A&gt;&amp;nbsp;by adding support for the following features:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Interop UserControls&lt;/STRONG&gt; - These are .NET controls that can be hosted &lt;EM&gt;&lt;STRONG&gt;on existing VB6 Forms&lt;/STRONG&gt;&lt;/EM&gt;.&amp;nbsp; These controls look and feel just like regular ActiveX controls, but you build them the same way you would any other .NET control.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;MDI Support&lt;/STRONG&gt; - One of the big pieces of feedback we heard after the initial release was that MDI support was very important.&amp;nbsp; With the introduction of Interop UserControls, you can now extend your MDI forms with .NET content.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Redistributable Package&lt;/STRONG&gt; - The toolkit's runtime now appears in the Prerequisites dialog in Visual Studio Setup Projects, so deploying your hybrid application is very simple.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;In the picture below you can see we've got a VB6 Form hosting a .NET UserControl which contains a MenuStrip and a ToolStrip.&amp;nbsp; By inserting default items, we can build a control containing a MenuStrip and a ToolStrip, and hook it into VB6 - all in less than a minute!&lt;/P&gt;
&lt;P&gt;&lt;IMG title="An Interop UserControl hosted on a VB6 form." style="WIDTH: 628px; HEIGHT: 390px" height=390 alt="An Interop UserControl hosted on a VB6 form." src="http://msdn2.microsoft.com/en-us/vbasic/bb419144.Interop2_01.gif" width=628 mce_src="http://msdn2.microsoft.com/en-us/vbasic/bb419144.Interop2_01.gif"&gt;&lt;/P&gt;
&lt;P&gt;Any public Properties, Methods, or Events defined in the UserControl are visible to VB6.&amp;nbsp; You can also use My.InteropToolbox to&amp;nbsp;raise&amp;nbsp;application-level events&amp;nbsp;and access Global variables.&lt;/P&gt;
&lt;P&gt;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;, and if you have questions you can contact Microsoft Developer Support or post questions at the Visual Basic Interop &amp;amp; Upgrade &lt;A class="" title=forum 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;forum&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;We're always interested in your feedback, so please let us know if there's a feature you'd like us to add!&amp;nbsp; You can post comments below or send mail to &lt;A href="mailto:vbpwrpk@microsoft.com"&gt;vbpwrpk@microsoft.com&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2382649" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vbteam/archive/tags/Jonathan+Aneja/default.aspx">Jonathan Aneja</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB2005/default.aspx">VB2005</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx">VB6_Migration/Interop</category></item><item><title>Interop Roadmap – UserControls, MDI, and Data</title><link>http://blogs.msdn.com/vbteam/archive/2006/11/02/interop-roadmap-usercontrols-mdi-and-data.aspx</link><pubDate>Fri, 03 Nov 2006 02:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:937676</guid><dc:creator>VBTeam</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/vbteam/comments/937676.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vbteam/commentrss.aspx?PostID=937676</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;Recently the VB team released the &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/vbasic/aa701259.aspx" mce_href="http://msdn2.microsoft.com/en-us/vbasic/aa701259.aspx"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;Interop Forms Toolkit&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;FONT face="Times New Roman"&gt;, which allows VB6 developers to extend their existing applications using .NET.&amp;nbsp; The toolkit allows developers to write a regular Windows Form in VB.NET, click “Generate Wrapper Classes”, and then call those forms from VB6.&amp;nbsp; It also provides mechanisms for firing and handling events, and sharing application state (i.e. Globals).&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;We’ve heard a lot of great feedback since the release.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For example, we heard that a better interop story and things like the toolkit help enable more gradual migrations.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We also heard that several scenarios would benefit from additional support.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Based on this we’ve been planning our next steps.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;Here’s a preview of the direction we’d like to head in with interop.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Two of the main areas we’re looking at are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt"&gt;&lt;FONT face="Times New Roman"&gt;Interop UserControl support – this is basically the next step after the Interop Toolkit that enables .NET UserControls to be hosted in VB6 forms using interop.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;As you’ll see below you can leverage UserControls to enable more UI interop scenarios.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt"&gt;&lt;FONT face="Times New Roman"&gt;Data Interop – looking at what we can provide to make it easier to pass data between VB6 and .NET.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;You can think of UserControl support as an extension to the Interop Forms Toolkit that adds a few more flexible ways to handle UI interop.&amp;nbsp; For example, UserControls allow users to add .NET UI extensions within the same form.&amp;nbsp; Also, given that a UserControl can be added to any VB6 form, there is good fidelity and communication between the VB6 forms.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;As a case in point, MDI form scenarios are not supported by the current Interop Forms Toolkit due to several limitations with Windows Forms interop and the VB6 IDE.&amp;nbsp; MDI support has been a top request since the release.&amp;nbsp; The good news is that we believe the UserControl approach &lt;B&gt;enables interop with MDI forms&lt;/B&gt;!&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;We have decided to share a &lt;B&gt;very early &lt;I&gt;(community supported only)&lt;/I&gt; Interop UserControl prototype&lt;/B&gt; with you to validate our direction and approach.&amp;nbsp; This prototype is a UserControl project template for VS 2005 that includes attributes, helper functions, configuration, and workarounds required to do basic UserControl interop scenarios.&amp;nbsp; You can use it to create a UserControl with UI, methods, properties, and even events.&amp;nbsp; Simply build it and then add it to your VB6 toolbox.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;To install the template, please see the file attached below called InteropUserControl.zip.&amp;nbsp; This is a Visual Studio 2005 template that you can try out by placing it in your “My Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual Basic” folder.&amp;nbsp; Again, this is only an early prototype so expect to hit some issues and use workarounds.&amp;nbsp; We hope to release a more complete version of this in the future.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;We’re really interested in your feedback on this approach, so please try out the template and let us know what you think!&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black"&gt;&lt;FONT face="Times New Roman"&gt;Jonathan Aneja &amp;amp; Paul Yuknewicz&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=937676" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/vbteam/attachment/937676.ashx" length="11351" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/vbteam/archive/tags/Paul+Yuknewicz/default.aspx">Paul Yuknewicz</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/IDE/default.aspx">IDE</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/Jonathan+Aneja/default.aspx">Jonathan Aneja</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB2005/default.aspx">VB2005</category><category domain="http://blogs.msdn.com/vbteam/archive/tags/VB6_5F00_Migration_2F00_Interop/default.aspx">VB6_Migration/Interop</category></item></channel></rss>