{"id":6703,"date":"2006-11-02T19:53:00","date_gmt":"2006-11-02T19:53:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vbteam\/2006\/11\/02\/interop-roadmap-usercontrols-mdi-and-data\/"},"modified":"2024-07-05T14:51:23","modified_gmt":"2024-07-05T21:51:23","slug":"interop-roadmap-usercontrols-mdi-and-data","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vbteam\/interop-roadmap-usercontrols-mdi-and-data\/","title":{"rendered":"Interop Roadmap &#8211; UserControls, MDI, and Data"},"content":{"rendered":"<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">Recently the VB team released the <\/font><a href=\"http:\/\/msdn2.microsoft.com\/en-us\/vbasic\/aa701259.aspx\"><span><font face=\"Times New Roman\">Interop Forms Toolkit<\/font><\/span><\/a><font face=\"Times New Roman\">, which allows VB6 developers to extend their existing applications using .NET.&nbsp; The toolkit allows developers to write a regular Windows Form in VB.NET, click \u201cGenerate Wrapper Classes\u201d, and then call those forms from VB6.&nbsp; It also provides mechanisms for firing and handling events, and sharing application state (i.e. Globals).<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><b><span><font face=\"Times New Roman\">&nbsp;<\/font><\/span><\/b><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">We\u2019ve heard a lot of great feedback since the release.<span>&nbsp; <\/span>For example, we heard that a better interop story and things like the toolkit help enable more gradual migrations.<span>&nbsp; <\/span>We also heard that several scenarios would benefit from additional support.<span>&nbsp; <\/span>Based on this we\u2019ve been planning our next steps.<span>&nbsp; <\/span><\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">&nbsp;<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">Here\u2019s a preview of the direction we\u2019d like to head in with interop.<span>&nbsp; <\/span>Two of the main areas we\u2019re looking at are:<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\"><\/font><\/span><\/p>\n<ul type=\"disc\">\n<li class=\"MsoNormal\"><span><font face=\"Times New Roman\">Interop UserControl support \u2013 this is basically the next step after the Interop Toolkit that enables .NET UserControls to be hosted in VB6 forms using interop.<span>&nbsp; <\/span>As you\u2019ll see below you can leverage UserControls to enable more UI interop scenarios.<span>&nbsp; <\/span><\/font><\/span><\/li>\n<li class=\"MsoNormal\"><span><font face=\"Times New Roman\">Data Interop \u2013 looking at what we can provide to make it easier to pass data between VB6 and .NET.<\/font><\/span><\/li>\n<\/ul>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\"><\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">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.&nbsp; For example, UserControls allow users to add .NET UI extensions within the same form.&nbsp; Also, given that a UserControl can be added to any VB6 form, there is good fidelity and communication between the VB6 forms.&nbsp; <\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">&nbsp;<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">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.&nbsp; MDI support has been a top request since the release.&nbsp; The good news is that we believe the UserControl approach <b>enables interop with MDI forms<\/b>!<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">&nbsp;<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">We have decided to share a <b>very early <i>(community supported only)<\/i> Interop UserControl prototype<\/b> with you to validate our direction and approach.&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.&nbsp; You can use it to create a UserControl with UI, methods, properties, and even events.&nbsp; Simply build it and then add it to your VB6 toolbox.&nbsp; <\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">&nbsp;<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">To install the template, please see the file attached below called InteropUserControl.zip.&nbsp; This is a Visual Studio 2005 template that you can try out by placing it in your \u201cMy Documents\\Visual Studio 2005\\Templates\\ProjectTemplates\\Visual Basic\u201d folder.&nbsp; Again, this is only an early prototype so expect to hit some issues and use workarounds.&nbsp; We hope to release a more complete version of this in the future.&nbsp; <\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">&nbsp;<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">We\u2019re really interested in your feedback on this approach, so please try out the template and let us know what you think!&nbsp; <\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">&nbsp;<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Times New Roman\">Jonathan Aneja &amp; Paul Yuknewicz<\/font><\/span><\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Components.PostAttachments\/00\/00\/93\/76\/76\/InteropUserControl.zip\">InteropUserControl.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently the VB team released the Interop Forms Toolkit, which allows VB6 developers to extend their existing applications using .NET.&nbsp; The toolkit allows developers to write a regular Windows Form in VB.NET, click \u201cGenerate Wrapper Classes\u201d, and then call those forms from VB6.&nbsp; It also provides mechanisms for firing and handling events, and sharing application [&hellip;]<\/p>\n","protected":false},"author":260,"featured_media":8818,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[192,195],"tags":[74,83,123,165,170],"class_list":["post-6703","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-featured","category-visual-basic","tag-ide","tag-jonathan-aneja","tag-paul-yuknewicz","tag-vb2005","tag-vb6_migrationinterop"],"acf":[],"blog_post_summary":"<p>Recently the VB team released the Interop Forms Toolkit, which allows VB6 developers to extend their existing applications using .NET.&nbsp; The toolkit allows developers to write a regular Windows Form in VB.NET, click \u201cGenerate Wrapper Classes\u201d, and then call those forms from VB6.&nbsp; It also provides mechanisms for firing and handling events, and sharing application [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/6703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/users\/260"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/comments?post=6703"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/6703\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media\/8818"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media?parent=6703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/categories?post=6703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/tags?post=6703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}