Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are the main changes in data types between Visual Basic 6.0 and VB .NET and how is this handled by the Upgrade Wizard?

0
Posted

What are the main changes in data types between Visual Basic 6.0 and VB .NET and how is this handled by the Upgrade Wizard?

0

The storage sizes for the Integer and Long data types have changed between VB 6.0 and Visual Basic .NET to maintain consistency with the .NET Framework. These changes affect almost every Windows API function declaration that involves the numeric types Integer and Long. In Visual Basic 6.0, an Integer is 16 bits and a Long is 32 bits. In Visual Basic .NET, an Integer is 32 bits and a Long is 64 bits. Visual Basic .NET adds a new type named Short, which, in terms of size, is the replacement for the Visual Basic 6.0 Integer type. In Visual Basic .NET, when you create a new Declare statement for a Windows API function, you need to take into account this difference. Any parameter type or user-defined type member that was formerly a Long needs to be declared as Integer; any member formerly declared as Integer needs to be declared as Short. The Visual Basic Upgrade Wizard will automatically change all the variable declarations in your code to use the correct size. You need to consider the siz

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123