upgrading applications to vb.net leveraging your visual basic 6 investments with vb 2005 & the...
TRANSCRIPT
Upgrading Applications to Upgrading Applications to VB.NETVB.NETUpgrading Applications to Upgrading Applications to VB.NETVB.NETLeveraging Your Visual Basic 6 Investments Leveraging Your Visual Basic 6 Investments with VB 2005 & the Interop Forms Toolkit with VB 2005 & the Interop Forms Toolkit 2.02.0
Jonathan AnejaJonathan AnejaProgram Manager – VB TeamProgram Manager – VB Team
AgendaAgenda
OverviewOverview
Interop Forms Toolkit 2.0Interop Forms Toolkit 2.0FormsForms
Global variables and EventsGlobal variables and Events
UserControlsUserControls
DeploymentDeployment
Interop Resources on the WebInterop Resources on the WebHow to use 5000 .NET Classes in VB6How to use 5000 .NET Classes in VB6
And much more!And much more!
OverviewOverview
How can we convert large VB6 apps to How can we convert large VB6 apps to VB.NET?VB.NET?
Solution - Phased Upgrades using InteropSolution - Phased Upgrades using InteropReduce Risk by moving one Form at a timeReduce Risk by moving one Form at a time
Extend existing assets with VB.NETExtend existing assets with VB.NET
Microsoft Interop Forms Toolkit 2.0Microsoft Interop Forms Toolkit 2.0Guidance, tools, and code to make phased upgrades Guidance, tools, and code to make phased upgrades easiereasier
Not a code converter!Not a code converter!VB6 Application
VB6Form(s)
VB.NETForm(s)
InteropInterop(COM)(COM)
Building a FormBuilding 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
Toolkit ServicesToolkit Services
Shared StateShared StateMy.InteropToolbox.GlobalsMy.InteropToolbox.Globals
Mechanism for sharing state between VB6 and VB.NETMechanism for sharing state between VB6 and VB.NET
Examples: Credentials, DB Conn String, VB6 GlobalsExamples: Credentials, DB Conn String, VB6 Globals
Application-level EventsApplication-level EventsMy.InteropToolbox.EventMessengerMy.InteropToolbox.EventMessenger
Bidirectional application-level eventingBidirectional application-level eventing
Examples: Startup, Shutdown, Error-handlingExamples: Startup, Shutdown, Error-handling
New Features in v2.0New Features in v2.0
Interop UserControlsInterop UserControls.NET Controls that look/feel like ActiveX .NET Controls that look/feel like ActiveX controlscontrols
Extend VB6 apps Extend VB6 apps within the same Formwithin the same Form
Can be placed on MDI FormsCan be placed on MDI Forms
Easier DeploymentEasier DeploymentRedistributable PackageRedistributable Package
RegFree COM SupportRegFree COM Support
More DocumentationMore Documentation
ExtensibilityExtensibility
InterfacesInterfacesAll of the core toolkit services have interfaces All of the core toolkit services have interfaces defined that you can write your own defined that you can write your own implementation ofimplementation of
InheritanceInheritanceAll of the core toolkit services are inheritable All of the core toolkit services are inheritable and the behavior is overridableand the behavior is overridable
Partial ClassesPartial ClassesThe add-in generated code can be extended via The add-in generated code can be extended via partial classespartial classes
Full Source Code AvailableFull Source Code Available
Interop ResourcesInterop Resources
VBRun (http://msdn.microsoft.com/vbrun)VBRun (http://msdn.microsoft.com/vbrun)Great content on using Interop to extend VB6 Great content on using Interop to extend VB6 appsapps
Learn how to use 5000 .NET Classes in VB6Learn how to use 5000 .NET Classes in VB6
Learn how to deploy a VB6 app using ClickOnceLearn how to deploy a VB6 app using ClickOnce
Use SQL Express and BackgroundWorker in VB6Use SQL Express and BackgroundWorker in VB6
Interop & Upgrade Forum Interop & Upgrade Forum http://forums.microsoft.com/msdn/showforhttp://forums.microsoft.com/msdn/showforum.aspx?forumid=879 um.aspx?forumid=879
Important LinksImportant Links
Download the Interop Forms Toolkit 2.0 Download the Interop Forms Toolkit 2.0 http://msdn2.microsoft.com/en-us/vbasic/bhttp://msdn2.microsoft.com/en-us/vbasic/bb419144.aspxb419144.aspx
Visual Basic Team Blog Visual Basic Team Blog http://blogs.msdn.com/vbteamhttp://blogs.msdn.com/vbteam
Send us feedback! Send us feedback! [email protected]@microsoft.com
Feature Ideas for future versionsFeature Ideas for future versions
Things you’d like to see us do in Data InteropThings you’d like to see us do in Data Interop
© 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.