Francesco Balena – Code Architects, Italy VB6 Migration: Tips, Traps, and Techniques
Me.About the  Programming Microsoft Visual Basic  series MSDN Regional director, Italy VB Migration Partner www.vbmigration.com
Code Architects Visual Studio Industry Partner ( VSIP ) the only Microsoft  ISVNXT  partner specialized in conversion and modernization of VB6 apps customers in Europe, United States & Canada, Australia and Asia dozens of millions of lines of code migrated official Microsoft Case study  published  on Microsoft.com, ERP system of about 1M lines of code
migration FAQs why migrating to .NET migrating vs. porting vs. extending using conversion tools the C# alternative
“ language impedance”    data types    type-char suffix    Array lower bounds    Optional params    As New variables    Byval argument passing    Defxxx    array rank    missing As    As Any parameters    block variables    date as double    array assignments    callbacks in Declare    As New arrays    UDT initialization    Variants    default parameterless members    Gosub    On Goto/GoSub    Byref ParamArray    Fixed-length strings    UDT assignments    byte-oriented string functions    enum/number conversions    IsMissing    Empty value    Null propagation    VarPtr, ObjPtr, StrPtr    class termination    IDisposable objects    default members in late-binding    OLE control    Line and Shape controls    control arrays    graphic methods    ScaleMode property    DrawMode property    DAO and RDO data-binding    ADO data-binding    ADO data-bound classes    DataEnvironment    VBControlExtender object    PropertyPages    UserDocuments    “classic” drag-and-drop    OLE drag-and-drop    Extender and Ambient properties    DDE    WebClasses    DHTML Pages    Sub Main in DLLs    SingleUse classes    Global classes    COM+ components    class persistence    Print and Printers    App, Screen, Forms objects    ActiveX EXEs    popup menus  
“ language impedance” (UW)
“ language impedance” (VBMP)
hidden traps strings parameter passing math operations collections fields ... and a lot more
concepts parser and code analyzer pre/post processing migration pragmas code generation engine support library code analysis & refactoring
concepts (in 75 minutes) parser and code analyzer pre / post processing migration pragmas code generation engine support library code analysis & refactoring
before migrating... use array with Lbound = 0 avoid Variants, if possible late binding Null propagation  create wrapper methods file I/O graphics data access Windows API calls (As Any, VarPtr, StrPtr) remove unused and unreachable code
support library many VB6 methods are missing or don’t preserve functional equivalence CDate, IsDate, IsObject Str, StrConv AscB, ChrB, LeftB, MidB, RightB, ... MsgBox, InputBox FileDateTime, Dir VarType, TypeName IsMissing, IsEmpty, IsNull DoEvents SavePicture, LoadPicture ...
post-processing process the output from UW leverage existing upgrade warnings can‘t replace a real parser, but it’s enough for many common issues
post-processing examples library methods DoEvents Controls.Add UDT initialization fixed-length strings inside UDT default methods in late-binding mode
migration pragmas similar to compiler directives special remarks with  '##   prefix '## ArrayBounds ForceZero project, file, method, variable scope '## project:ConvertGosubs True '## myvar.InferType convert-test-fix  methodology
migration pragmas examples ExcludeStatement InsertStatement ReplaceStatement  AutoNew AutoDispose ReplaceCurrentFile IncludeFile
refactoring with PostProcess Not x Is y    x IsNot y Dim x As Short : x = 1    Dim x As Short = 1 Dim x As Short: For x = 1     For x As Short = 1  While…End While    Do…Loop If x = True Then    If x Then If x = False Then    If Not x Then If bool1 And bool2    If bool1 AndAlso bool2 … If bool1 Or bool2    If bool1 OrElse bool2 … more details here:  www.vbmigration.com/blog
VB Migration Partner VB6 project groups all VB6 keywords  (except VarPtr, ObjPtr, StrPtr) advanced code analysis and refactoring 70+ VB6 controls, drag-and-drop, popup menus graphic methods, user-defined ScaleMode null propagation in expressions  (the VB6Variant type) ADO, DAO, RDO data-binding  try-catch, gosubs, nested Ifs, type inference ADODB -> ADO.NET  migration  (ADOLibrary) pragmas & convert-test-fix methodology
VB6 migration:  tips, traps, and tricks knowledge base, videos, code samples, articles, links, and resources  at www.vbmigration.com slides available at www.slideshare.net/VBMigrationPartner blog www.vbmigration.com/blog LinkedIn Group on VB6 Migration www.linkedin.com/groups?gid=3074090 Facebook Fan Page on VB6 Migration facebook.com/FrancescoBalenaOnVB6Migration
Get free advice Each VB6 application is different and creates  unique  challenges in the migration to .NET. To learn more about  your  VB6 applications, run  VB6 Analyzer  on your source code and  send us  the generated text file.  You will receive a detailed report on your VB6 applications and how VB Migration Partner can help you to quickly and effectively migrate it to .NET. www.vbmigration.com/getfreeadvice.aspx

More Related Content

PPT
Visual Basic Codes And Screen Designs
PPT
Visual basic ppt for tutorials computer
PDF
Porting VisualWorks code to Pharo
PDF
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
PDF
Android training in Nagpur
PDF
Android classes-in-pune-syllabus
PPT
DotNet Introduction
PDF
Wondershare Filmora Crack Free Download 2025
Visual Basic Codes And Screen Designs
Visual basic ppt for tutorials computer
Porting VisualWorks code to Pharo
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Android training in Nagpur
Android classes-in-pune-syllabus
DotNet Introduction
Wondershare Filmora Crack Free Download 2025

Similar to Basta! 2010 - VB6 Migration: Tips, Traps, and Techniques (20)

PDF
Download FL Studio Crack Latest version 2025
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Nicepage 6.7.6 Crack + Activation Key Latest
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
PDF
iTop VPN Crack Latest Version 2025 Free Download With Keygen
PDF
Download GTA 5 Free Full PC Game+Latest Version 2025
PDF
JavaScript Miller Columns
PDF
Node.js for enterprise - JS Conference
PPTX
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
PPTX
Vert.x devoxx london 2013
PDF
How Shit Works - Source Maps
PDF
Machine Learning Data Lineage with MLflow and Delta Lake
PPT
Visual studio.net
PPT
Visual Studio.NET
PPTX
Metaworks4 intro
PDF
Dmytro Kochergin Angular 2 and New Java Script Technologies
PPTX
Overview of VS2010 and .NET 4.0
PPTX
Agile Development in .NET
PPTX
VB.Net Mod1.pptx
PPTX
Modern C++
Download FL Studio Crack Latest version 2025
OOP with Java - Java Introduction (Basics)
Nicepage 6.7.6 Crack + Activation Key Latest
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
iTop VPN Crack Latest Version 2025 Free Download With Keygen
Download GTA 5 Free Full PC Game+Latest Version 2025
JavaScript Miller Columns
Node.js for enterprise - JS Conference
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
Vert.x devoxx london 2013
How Shit Works - Source Maps
Machine Learning Data Lineage with MLflow and Delta Lake
Visual studio.net
Visual Studio.NET
Metaworks4 intro
Dmytro Kochergin Angular 2 and New Java Script Technologies
Overview of VS2010 and .NET 4.0
Agile Development in .NET
VB.Net Mod1.pptx
Modern C++
Ad

Recently uploaded (20)

PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Getting Started with Data Integration: FME Form 101
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
The various Industrial Revolutions .pptx
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Hybrid model detection and classification of lung cancer
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Hindi spoken digit analysis for native and non-native speakers
Zenith AI: Advanced Artificial Intelligence
Getting Started with Data Integration: FME Form 101
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
The various Industrial Revolutions .pptx
Tartificialntelligence_presentation.pptx
Web Crawler for Trend Tracking Gen Z Insights.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Hybrid model detection and classification of lung cancer
Assigned Numbers - 2025 - Bluetooth® Document
A comparative study of natural language inference in Swahili using monolingua...
A contest of sentiment analysis: k-nearest neighbor versus neural network
Univ-Connecticut-ChatGPT-Presentaion.pdf
Developing a website for English-speaking practice to English as a foreign la...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Enhancing emotion recognition model for a student engagement use case through...
A review of recent deep learning applications in wood surface defect identifi...
A novel scalable deep ensemble learning framework for big data classification...
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Ad

Basta! 2010 - VB6 Migration: Tips, Traps, and Techniques

  • 1. Francesco Balena – Code Architects, Italy VB6 Migration: Tips, Traps, and Techniques
  • 2. Me.About the Programming Microsoft Visual Basic series MSDN Regional director, Italy VB Migration Partner www.vbmigration.com
  • 3. Code Architects Visual Studio Industry Partner ( VSIP ) the only Microsoft ISVNXT partner specialized in conversion and modernization of VB6 apps customers in Europe, United States & Canada, Australia and Asia dozens of millions of lines of code migrated official Microsoft Case study published on Microsoft.com, ERP system of about 1M lines of code
  • 4. migration FAQs why migrating to .NET migrating vs. porting vs. extending using conversion tools the C# alternative
  • 5. “ language impedance”  data types  type-char suffix  Array lower bounds  Optional params  As New variables  Byval argument passing  Defxxx  array rank  missing As  As Any parameters  block variables  date as double  array assignments  callbacks in Declare  As New arrays  UDT initialization  Variants  default parameterless members  Gosub  On Goto/GoSub  Byref ParamArray  Fixed-length strings  UDT assignments  byte-oriented string functions  enum/number conversions  IsMissing  Empty value  Null propagation  VarPtr, ObjPtr, StrPtr  class termination  IDisposable objects  default members in late-binding  OLE control  Line and Shape controls  control arrays  graphic methods  ScaleMode property  DrawMode property  DAO and RDO data-binding  ADO data-binding  ADO data-bound classes  DataEnvironment  VBControlExtender object  PropertyPages  UserDocuments  “classic” drag-and-drop  OLE drag-and-drop  Extender and Ambient properties  DDE  WebClasses  DHTML Pages  Sub Main in DLLs  SingleUse classes  Global classes  COM+ components  class persistence  Print and Printers  App, Screen, Forms objects  ActiveX EXEs  popup menus 
  • 8. hidden traps strings parameter passing math operations collections fields ... and a lot more
  • 9. concepts parser and code analyzer pre/post processing migration pragmas code generation engine support library code analysis & refactoring
  • 10. concepts (in 75 minutes) parser and code analyzer pre / post processing migration pragmas code generation engine support library code analysis & refactoring
  • 11. before migrating... use array with Lbound = 0 avoid Variants, if possible late binding Null propagation create wrapper methods file I/O graphics data access Windows API calls (As Any, VarPtr, StrPtr) remove unused and unreachable code
  • 12. support library many VB6 methods are missing or don’t preserve functional equivalence CDate, IsDate, IsObject Str, StrConv AscB, ChrB, LeftB, MidB, RightB, ... MsgBox, InputBox FileDateTime, Dir VarType, TypeName IsMissing, IsEmpty, IsNull DoEvents SavePicture, LoadPicture ...
  • 13. post-processing process the output from UW leverage existing upgrade warnings can‘t replace a real parser, but it’s enough for many common issues
  • 14. post-processing examples library methods DoEvents Controls.Add UDT initialization fixed-length strings inside UDT default methods in late-binding mode
  • 15. migration pragmas similar to compiler directives special remarks with '## prefix '## ArrayBounds ForceZero project, file, method, variable scope '## project:ConvertGosubs True '## myvar.InferType convert-test-fix methodology
  • 16. migration pragmas examples ExcludeStatement InsertStatement ReplaceStatement AutoNew AutoDispose ReplaceCurrentFile IncludeFile
  • 17. refactoring with PostProcess Not x Is y  x IsNot y Dim x As Short : x = 1  Dim x As Short = 1 Dim x As Short: For x = 1  For x As Short = 1 While…End While  Do…Loop If x = True Then  If x Then If x = False Then  If Not x Then If bool1 And bool2  If bool1 AndAlso bool2 … If bool1 Or bool2  If bool1 OrElse bool2 … more details here: www.vbmigration.com/blog
  • 18. VB Migration Partner VB6 project groups all VB6 keywords (except VarPtr, ObjPtr, StrPtr) advanced code analysis and refactoring 70+ VB6 controls, drag-and-drop, popup menus graphic methods, user-defined ScaleMode null propagation in expressions (the VB6Variant type) ADO, DAO, RDO data-binding try-catch, gosubs, nested Ifs, type inference ADODB -> ADO.NET migration (ADOLibrary) pragmas & convert-test-fix methodology
  • 19. VB6 migration: tips, traps, and tricks knowledge base, videos, code samples, articles, links, and resources at www.vbmigration.com slides available at www.slideshare.net/VBMigrationPartner blog www.vbmigration.com/blog LinkedIn Group on VB6 Migration www.linkedin.com/groups?gid=3074090 Facebook Fan Page on VB6 Migration facebook.com/FrancescoBalenaOnVB6Migration
  • 20. Get free advice Each VB6 application is different and creates unique challenges in the migration to .NET. To learn more about your VB6 applications, run VB6 Analyzer on your source code and send us the generated text file. You will receive a detailed report on your VB6 applications and how VB Migration Partner can help you to quickly and effectively migrate it to .NET. www.vbmigration.com/getfreeadvice.aspx