Q
Problem solve Get help with specific problems with your technologies, process and projects.

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

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

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

Close