Home > Ask the Microsoft .Net Development Experts > Visual Basic .NET Questions & Answers > What are the known problems when converting from VB6 to VB.NET?
Ask The Win Development Expert: Questions & Answers
EMAIL THIS

What are the known problems when converting from VB6 to VB.NET?

Tom Barnaby EXPERT RESPONSE FROM: Tom Barnaby

Pose a Question
Other Win Development Categories
Meet all Win Development Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 29 March 2001
I haven't seen much mentioned about conversion from VB6 to VB.NET. Can you tell me how easy (or difficult) you anticipate this to be? What are the known problems? Thanks.

>
Converting code from VB6 to VB.NET is going to be EXTREMELY DIFFICULT. So much so that I doubt that many will try strictly for economic reasons. Instead, it makes more sense to develop in parallel, i.e. current projects remain written and compiled in VB6, while new initiatives use VB.NET.

That said, here are a few of the major changes:

  • Short is now 16 bit, Integer is 32 bit, and Long is 64 bit.
  • Reference counting is dropped in favor of garbage collection; therefore, code in a Terminate event may not run until long after the object is no longer in use.
  • All arrays have a lower bound of 0. When declaring an array, the value in parenthesis is the length instead of the upper bound. For example "Dim I(4) as Integer" results an array indexed from 0 to 3.
  • The Currency data type is no longer supported.
  • Parameters default to pass by value instead of pass by reference.
  • And, Or, XOR, NOT act upon Boolean values only.
  • And, Or operations are short-circuited. For example, in the statement "If False And DoSomething() Then", the DoSomething function will NEVER execute.
  • Default properties are restricted to properties that take a parameter (like the Item property of the Collection) object.
  • The keyword Set is no longer supported.

I think that should give you a general idea. If you want to learn more, I highly recommend pointing your browser here:

http://msdn.microsoft.com/vbasic/technical/upgrade/language.asp


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Visual Basic .NET
Access VB .NET Windows control on client side
Drop down list server control creates error message
Converting floating values to byte form
Datagrid issue: 'onselection' is not populating
Read data from parallel port
What is the use of these constructors?
Give me an ODBC connect, with SQL authentication
Converting EXE-files to VB components
Generating classes like we did in VB6
Manipulating text through VB.NET

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Windows Development - White Papers, News and Expert Advice
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts