1 / 22

Migrating VB 6 Applications to VB .Net

Migrating VB 6 Applications to VB .Net. Nilotpal Bhattacharya Partner Technical Consultant | Microsoft. Agenda. Why VB .NET? Migration Decision Framework Migration Strategies Migration Tools Demos. Why VB .NET?. Move towards Object Orientation Many great language features

gazit
Download Presentation

Migrating VB 6 Applications to VB .Net

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Migrating VB 6 Applications to VB .Net Nilotpal Bhattacharya Partner Technical Consultant| Microsoft

  2. Agenda • Why VB .NET? • Migration Decision Framework • Migration Strategies • Migration Tools • Demos

  3. Why VB .NET? • Move towards Object Orientation • Many great language features • Better and powerful IDE • Awesome XML support • Disconnected data architecture • Web programming support • Easy deployment • Plenty of resources and full support

  4. Migrate Rewrite Custom Application TYpe Replace/ Partner Reuse Standard Low High Application Quality Migration Decision Framework

  5. Migration Strategies Horizontal Com Interop Component vs. Horizontal vs. Vertical Migration Vertical Form Interop Component

  6. Using COM from .NET

  7. Potential issues with RCW • Object Runtime • Components that assume deterministic finalization may “leak” resources • Destrcutors or Class_Terminate events will not execute untill the object is being collected Marshalling Types Custom marshalling/serlializationof complex types may be required Try to expose simple types (string, integers, dates when possible

  8. DEMO Runtime Callable Wrapper

  9. Using .NET from COM

  10. Restrictions with CCW • Classes must have a default constructor (One that takes no parameter) • Classes cannot expose shared methods • Classes cannot expose overloaded methods • Note: If you expose overloaded methods, then you’ll get non descriptive names in the CCW (e.g Hello and Hello_2

  11. DEMO Using .Net from COM

  12. Interop Forms Toolkit 2.0 • Reduce risks by moving one form at a time instead of entire modules or tiers • Extend existing VB Forms with VB .Net Controls • Provides guidance, tools and code to make phased upgrade easier • Not a code converter VB 6 Application Com Interop VB6 Form(s) VB .NET Form(s)

  13. Features in v2.0 • InteropUserControls • Net Controls that look and feel like ActiveX controls • Extend VB6 apps within the same form • Can be placed in MDI • Easy Deployment • Redistributable • RegFree COM Support • More Documentation

  14. DEMO Interop ToolKit v2.0

  15. MigrationTools • Code Advisor • Add-in for VB6 • Review code against pre-determined standards • Identify migration issues • Upgrade Assessment tool • File Dependency and Call graphs • Estimates of cost and effort to migrate • Other potential migration issues

  16. MigrationMigration Wizard • EXE & DLL • Copies project • Creates reports • Links to Help • Four Levels • Issue No Automatic Upgrade • ToDo Requires Finishing • Warning Possible Behavior Change • Note Informational

  17. DEMO Tools

  18. Some Pointers for migration • Install Visual Basic 6.0 on the computer that you will be using for upgrading. • Windows Forms is largely compatible barring few differences like • Non compatible Clipboard statements • No support for the Name property for forms and controls at run time • Setting 0 in Timer control to disable the Timer. • Get an estimate by running Upgrade Wizard

  19. FAQ – VB Support policyHow much longer are you supporting VB6? • Mainstream support ended March 31, 2005 • 7 years of free support is far longer than competitors • Extended support is available through March 31, 2008. Custom support through 2012 • The VB6 Runtime is slated to ship as a part of Windows Vista

  20. “Upgrading VB6 to VB.NET” MS Press – FREE ! http://msdn.microsoft.com/en-us/vbrun/ms788236.aspx Designing an Application Migration Strategy… http://msdn.microsoft.com/en-us/library/aa288720.aspx Upgrade Assessment tool and Upgrade guide http://msdn.microsoft.com/en-us/library/aa480541.aspx Preparing your Visual Basic 6 Applications for Upgrade http://msdn.microsoft.com/en-us/library/aa260644.aspx Code Advisor http://www.microsoft.com/downloads/details.aspx?familyid=a656371a-b5c0-4d40-b015-0caa02634fae&displaylang=en Resources

  21. Feedback / QnA • Your Feedback is Important! Please take a few moments to fill out our online feedback form • Use the Question Manager on LiveMeeting to ask your questions now!

More Related