Just in: Interop Forms Toolkit 1.0 for gradual VB6 to VB.NET upgrades!

Hi VB Community Members,

We wanted you to know about the release of the new Interop Forms Toolit 1.0.  In a nutshell the toolkit makes it easy to create Windows Forms in VB.NET and then add them to an existing VB6 application.  This makes it much easier to extend your VB6 app gradually and incrementally (form by form). 

This fits into our larger VB Power Packs initiative to deliver valuable features between Visual Basic 2005 and the next release, based on your feedback.

We hope you get this today and try it out!

 Download page:
http://msdn.microsoft.com/vbasic/downloads/powerpacks/interopforms/default.aspx

Questions and discusions:
Visual Basic Interop and Upgrade Forum

Enjoy!

Visual Basic Team



Answer this question

Just in: Interop Forms Toolkit 1.0 for gradual VB6 to VB.NET upgrades!

  • viv3

    Here's some information from the Toolkit's documentation:

    Interop UserControl limitations

    Interop UserControls are .NET controls, and as such there are a few limitations when using them in Visual Basic 6.0.

    • You should not show a .NET form from an Interop UserControl. The .NET form will not close if the parent form is closed first, and tabbing on the .NET form will not work.
    • Code in the GotFocus and LostFocus events of the Interop UserControl defined in Visual Studio 2005 will never be executed; the intrinsic GotFocus and LostFocus events on an instance of the control in Visual Basic 6.0 will still work. If you need to handle the events in Visual Basic 2005, use the Enter and Leave events instead.
    • Control arrays of Interop UserControls are not supported.
    • If a MenuStrip control is used on an Interop UserControl, menu merging with WindowList enabled MDI forms is not supported.
    • There are known issues when using an ElementHost control for Windows Presentation Foundation (WPF) on an Interop UserControl; it can only be hosted on a Windows Form. While the scenario is technically unsupported, it is possible to get this to work.
    • Interop UserControls can only be hosted on Visual Basic 6.0 forms, they cannot be placed on ActiveX controls or in any other type of host (for example Microsoft Office).

    Hope that helps,

    Jonathan



  • wms103006

    Hey paul,

    I am very interested in solving the .net forms inside vb6 mdi, can you please send an example or at least the idea of how to implement such thing

    Diego



  • tm9t9

    Is there an analogous toolkit for VisualStudio c++ version 6 Can one call c# or vb.net winforms from c++ ver. 6 I guess the same exact form in c# could be called by this toolkit from vb6

  • QWERTYtech

    [NOTE: the thing to do is create a new post for issues like this. ]

    Hi Al,

    I don’t know why VB6 install would cause the problem, but we have seen issues related to a few things.

    1) resetting the VS2005 profile or Import/Export settings

    When you reload settings it may not have an explicit entry for the Add-in command.

    The workaround is:

    1) open VS 2005 and load the appropriate project

    2) open Tools:Customize (this lets you customize the IDE commands)

    3) click on the Commands tab

    4) select the “Addins” category

    5) Drag n drop the “Generate InteropForm Wrapper Classes” command to your Tools menu

    If that command does not show up in step 5, there may be an internal issue with the addin loader. Try workaround #2 below.

    2) internal issue causing command to disappear

    There is an internal problem with our addin mechanism that will sometimes cause a command to disappear. If you’re in this state, you can try this.

    1) Open a Visual Studio 2005 Command Prompt from the Start Menu / All Programs / Visual Studio 2005/ Visual Studio Tools

    2) Execute the command: Devenv /resetaddin Microsoft.InteropFormTools.InteropFormProxyGenerator.Connect

    I hope one of these does the trick for you. Please let us know.

    Thanks,

    Paul


  • MaggieChan

    Hi Steve,

    Thanks for the feedback.

    We understand that MDI is an important scenario. MDI is not a supported scenario of the toolkit - this is a known limitation. Our goal is to enable this scenario instead using .NET User Controls & interop. We hope to come out with some guidance here soon.

    Best,

    Paul


  • Anabhra

    We've just shipped v2 of the InteropForms toolkit with couple of usercontrol templates that make it even easier to add .net functionality to your VB6 application. We've also fixed a few misc bugs with the older interopforms implementation and have greatly improved our deployment story. You can now deploy your controls using regfree com if you want and we also have a bootstrapper package for deploying the IF redist file if you use that.

    Check out Jon's post here for more information.

    http://blogs.msdn.com/vbteam/archive/2007/05/02/just-released-interop-forms-toolkit-2-0.aspx

    Anyway, try it out and let us know if it helps you or not. There are some known limitations, but I've been able to some quite interesting apps (like hosting WPF controls in VB6!) that weren't ever possible before.

    Toddap_MS


  • Peter Chapman

    You mention some limitations, can you explain what they are

    I have 2 large VB6 UI projects that I want to get up to .net. If I were to go down the route of using the 2.0 toolkit, I would like to know what might not work.

    Thanks


  • RabinLin

    Hi Team,

    I installed this today cos I have a client who needs to be able to call some windows forms from a VB6 GIS application they have - and it sounded like the way to go. I then got some sample forms working (from Access basic, as I didnt have VB6 installed on my machine). That worked, but was giving me locking problems, so I decided to bite the bullet and install VB6. once VB6 was installed I have lost the "Generate InteropForm Wrapper Classes" from the tools menu. I have uninstalled and re-installed the tool - but its still missing.

    Probably a simple solution and I am being dense, but any help would be appreciated.

    Cheers, Al


  • Cesar Francisco

    Hey ,

    Really trilled about this toolkit, it may be the last push for my customer to get him on the migration path.
    but i seem to have some problems when i try to call a vb.net form from a vb6 mdiForm.

    Any suggestions

    greetz,


  • V1ad

    PaulYuk_MS wrote:

    Hi VB Community Members,

    We wanted you to know about the release of the new Interop Forms Toolit 1.0. In a nutshell the toolkit makes it easy to create Windows Forms in VB.NET and then add them to an existing VB6 application. This makes it much easier to extend your VB6 app gradually and incrementally (form by form).

    This fits into our larger VB Power Packs initiative to deliver valuable features between Visual Basic 2005 and the next release, based on your feedback.

    We hope you get this today and try it out!

    Download page:
    http://msdn.microsoft.com/vbasic/downloads/powerpacks/interopforms/default.aspx

    Questions and discusions:
    Visual Basic Interop and Upgrade Forum

    Enjoy!

    Visual Basic Team



    Later in the thread you mention that .net form interop with VB6 MDI is not supported.

    Do you know of a timetable for providing this capability, or whether there is(are) some .net control(s) capable of playing in a VB6 MDI (currently, my .net form show up a modal window).
    Thanks in advance for any help on this issue

  • nayob

    There has been some work using C# with a Visual Studio add-in to create an Interop form for VB6. I have tried it and it works well.

    http://www.codeproject.com/useritems/VB6_-_C__Interop_Form.asp

    Also, I have heard of someone working on using the Interop form successfully in C++ 6, but have not seen any specifics.

    Joe Calabrese


  • Cristian Nieva


    Hey Paul ,

    thanks for the tip and the fast response...

    I will try it using .net user control interop

    greetings,

    Steve


  • Aabra

    PaulYuk_MS wrote:

    We understand that MDI is an important scenario. MDI is not a supported scenario of the toolkit - this is a known limitation. Our goal is to enable this scenario instead using .NET User Controls & interop. We hope to come out with some guidance here soon.

    It's quite important since most surviving VB6 apps in the corporate environment are MDI based monsters with 100+ forms. VB programmers need this support ASAP in order to keep their Winchester Mystery House style applications growing so that they're not haunted by ghosts from accounting and marketing.



  • Zooma

    PaulYuk_MS wrote:

    Hi VB Community Members,

    We wanted you to know about the release of the new Interop Forms Toolit 1.0. In a nutshell the toolkit makes it easy to create Windows Forms in VB.NET and then add them to an existing VB6 application. This makes it much easier to extend your VB6 app gradually and incrementally (form by form).

    This fits into our larger VB Power Packs initiative to deliver valuable features between Visual Basic 2005 and the next release, based on your feedback.

    We hope you get this today and try it out!

    Download page:
    http://msdn.microsoft.com/vbasic/downloads/powerpacks/interopforms/default.aspx

    Questions and discusions:
    Visual Basic Interop and Upgrade Forum

    Enjoy!

    Visual Basic Team



    Later in the thread you mention that .net form interop with VB6 MDI is not supported.

    Do you know of a timetable for providing this capability, or whether there is(are) some .net control(s) capable of playing in a VB6 MDI (currently, my .net form shows up as a modal window).
    Thanks in advance for any help on this issue

  • Just in: Interop Forms Toolkit 1.0 for gradual VB6 to VB.NET upgrades!