Export (0) Print
Expand All

Localization and Globalization for Visual Basic 6.0 Users 

Both Visual Basic 6.0 and Visual Basic 2005 provide support for international applications. However, the concepts and techniques for localizing and globalizing an application are different.

Conceptual Differences

Localizing Resources

In Visual Basic 6.0, international versions of an application are created by putting all localizable information, such as strings, into a separate resource file (.res) for each language. At run time, locale-specific resources are loaded from the resource file by calling the LoadResString, LoadResPicture, and LoadResData functions.

In Visual Basic 2005, international versions of an application are created by changing the Language property of a form at design time. A separate resource file (.resx) is automatically created for each locale selected. You no longer need to explicitly load resources from code; resources are automatically loaded based on the user's locale. For more information, see Globalizing Windows Forms.

Editing Resources

In Visual Basic 6.0, resource files can be edited using the resource editor add-in or the Visual C++ resource editors.

In Visual Basic 2005, the Resource Editor is built into the IDE as a part of the Project Designer. For more information, see Managing Application Resources.

Unicode

In Visual Basic 6.0, strings are represented internally as Unicode characters but are displayed using Windows code pages. The StrConv function, along with binary and Unicode versions of string manipulation functions (for example, ChrB and ChrW), are necessary to convert between ANSI and DBCS code pages.

In Visual Basic 2005, forms are entirely Unicode-enabled; conversion between code pages is no longer required. For more information, see Encoding and Windows Forms Globalization.

Date and Currency Formatting

In Visual Basic 6.0, the formatting of dates and currency in code requires special consideration; values entered as text can be incorrectly interpreted when converted to dates or currency in localized applications.

In Visual Basic 2005, dates and currency are automatically formatted according to the user's culture. You can override the settings, if necessary, through functions in the System.Globalization namespace. For more information, see Culture-Specific Classes for Global Windows Forms and Web Forms.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft