This documentation is archived and is not being maintained.

Function is not supported

Visual Studio .NET 2003

Some Visual Basic 6.0 functions are no longer supported in Visual Basic .NET. The functionality that these functions provided can be accomplished using new functions in the .NET Framework; however, the differences in implementation make it too difficult to upgrade automatically.

The following functions are not upgraded:

CVErr function

The CVErr function in Visual Basic 6.0 returned a Variant of the subtype Error that contained an error number. Variants are no longer supported in Visual Basic .NET, so this function is no longer useful.

Error handling in general has changed significantly in Visual Studio .NET. For more information, see Event Handlers in Visual Basic and Visual C#.

IMEStatus function

The IMEStatus function in Visual Basic 6.0 was used to return the status of the Input Method Editor (IME) mode, available only on Chinese, Japanese, and Korean versions of Windows.

In Visual Basic .NET, this functionality is replaced by the IMEMode property of most controls and by the IMEMode enumeration, both in the System.Windows.Forms namespace. For more information, see Control.DefaultImeMode Property or ImeMode Enumeration.

AscB, ChrB, InstrB, LeftB, LenB, MidB, RightB functions

The AscB, ChrB, InstrB, LeftB, LenB, MidB, and RightB functions in Visual Basic 6.0 were string-handling functions that returned their results in bytes. They were used primarily for converting strings for use by double-byte character set languages.

In Visual Basic .NET, encoding and decoding functions in the System.Text namespace replace this functionality. For more information, see Globalizing and Localizing Applications.

VarPtr, ObjPtr, StrPtr, VarPtrArray, and VarPtrStringArray functions

The VarPtr, ObjPtr, StrPtr, VarPtrArray, and VarPtrStringArray functions in Visual Basic 6.0 were undocumented and unsupported functions that could be used to return a pointer to a memory address. Although unsupported, these functions were sometimes used when working with Windows API calls that would have otherwise been inaccessible from Visual Basic.

These functions are not supported in Visual Studio .NET; however, most of the scenarios where they were used can be addressed through new functionality in the .NET Framework. Many of the Windows API calls that were necessary in Visual Basic 6.0 are now encapsulated in the framework; pointer references are no longer necessary.

What to do next

  • Review your code to determine what was being accomplished with this function, search the .NET Framework documentation for suitable replacements, and modify your code as necessary.

See Also

What's New in Visual Basic and Visual C# | Programming with the .NET Framework

Show: