Download presentation
Presentation is loading. Please wait.
Published byJuliet Hubbard Modified over 9 years ago
1
Upgrading Applications to VB.NET Leveraging Your Visual Basic 6 Investments with VB 2005 & the Interop Forms Toolkit 2.0 Jonathan Aneja Program Manager – VB Team
2
Agenda Overview Interop Forms Toolkit 2.0 Forms Global variables and Events UserControlsDeployment Interop Resources on the Web How to use 5000.NET Classes in VB6 And much more!
3
Overview How can we convert large VB6 apps to VB.NET? Solution - Phased Upgrades using Interop Reduce Risk by moving one Form at a time Extend existing assets with VB.NET Microsoft Interop Forms Toolkit 2.0 Guidance, tools, and code to make phased upgrades easier Not a code converter! VB6 Application VB6 Form(s) VB.NET Form(s) Interop(COM)
4
Building a Form 1. Create the.NET form1. Create the.NET form 2. Apply attributes2. Apply attributes 3. Click Tools->Generate Wrapper Classes3. Click Tools->Generate Wrapper Classes 4. Build solution4. Build solution 5. Add reference in VB65. Add reference in VB6 6. Write VB6 code to display the form6. Write VB6 code to display the form
5
Toolkit Services Shared State My.InteropToolbox.Globals Mechanism for sharing state between VB6 and VB.NET Examples: Credentials, DB Conn String, VB6 Globals Application-level Events My.InteropToolbox.EventMessenger Bidirectional application-level eventing Examples: Startup, Shutdown, Error-handling
6
Interop Forms
7
New Features in v2.0 Interop UserControls.NET Controls that look/feel like ActiveX controls Extend VB6 apps within the same Form Can be placed on MDI Forms Easier Deployment Redistributable Package RegFree COM Support More Documentation
8
Interop UserControls
9
Extensibility Interfaces All of the core toolkit services have interfaces defined that you can write your own implementation of Inheritance All of the core toolkit services are inheritable and the behavior is overridable Partial Classes The add-in generated code can be extended via partial classes Full Source Code Available
10
Interop Resources VBRun (http://msdn.microsoft.com/vbrun) http://msdn.microsoft.com/vbrun Great content on using Interop to extend VB6 apps Learn how to use 5000.NET Classes in VB6 Learn how to deploy a VB6 app using ClickOnce Use SQL Express and BackgroundWorker in VB6 Interop & Upgrade Forum http://forums.microsoft.com/msdn/showforum.asp x?forumid=879 http://forums.microsoft.com/msdn/showforum.asp x?forumid=879 http://forums.microsoft.com/msdn/showforum.asp x?forumid=879
11
Important Links Download the Interop Forms Toolkit 2.0 http://msdn2.microsoft.com/en- us/vbasic/bb419144.aspx http://msdn2.microsoft.com/en- us/vbasic/bb419144.aspx http://msdn2.microsoft.com/en- us/vbasic/bb419144.aspx Visual Basic Team Blog http://blogs.msdn.com/vbteam http://blogs.msdn.com/vbteam Send us feedback! vbpwrpk@microsoft.com vbpwrpk@microsoft.com Feature Ideas for future versions Things you’d like to see us do in Data Interop
12
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.