The information in this article applies to:
SUMMARY32-bit Visual Basic applications that are distributed in more than one country must rely upon the Regional Settings specifications of the Windows Control Panel for retrieving the appropriate currency symbol to display to the user. Retrieving the currency symbol involves calling the GetLocaleInfo function from the 32-bit Windows API function library. MORE INFORMATION
The following code can be used to retrieve the currency symbol as specified in the Regional Settings of the Windows Control Panel. The GetUserDefaultLCID() function retrieves the default locale for the current user and the GetLocaleInfo() function retrieves information relating to the specified locale. Keep in mind that Visual Basic 6.0 has built in functions to automatically format numbers with the currency symbol as specified in the Control Panel's Regional Settings. While this code works in Visual Basic 6.0, the primary audience for this article are 32-bit Visual Basic 4.0 and Visual Basic 5.0 developers.
REFERENCES
For general information on how to use API functions from within Visual Basic, please see the following Microsoft Knowledge Base articles: Q145679 HOWTO: Use the Registry API to Save and Retrieve Setting Q178020 FILE: WIN32API.EXE: Updated Version of Win32api32.txt File For information on how to use the API Viewer add-in that ships with Visual Basic, please see "Accessing The Microsoft Windows API" in the Visual Basic Books Online. For more information about locale identifiers, please see "Visual Basic Programmer's Guide to the Win32 API", by Daniel Appleman, PC Magazine Press Additional query words: currency symbol regional settings locale
Keywords : kbAPI kbVBp kbGrpVBDB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |