Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get measurement system
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00807522
Message ID:
00808111
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
>Hi George.
>
>>Alexander's solution is better than mine. Go with that.
>
>Except it always gives 0 for me, regardless of how Measurement is set.
>
Doug,

After some digging around on my hard drive, I found some stuff that I've used in the past that should work for you. Try this
DECLARE INTEGER GetUserDefaultLCID IN Win32API
DECLARE INTEGER GetLocaleInfo IN Win32API;
  INTEGER Locale, INTEGER LCType,;
  STRING @lpLCData, INTEGER cchData
#define LOCALE_IMEASURE 0x0000000D
lnUserLCID = GetUserDefaultLCID()
lcbuffer = SPACE(4)
lnresult = GetLocaleInfo(lnSysLCID, LOCALE_IMEASURE, @lcbuffer, LEN(lcbuffer))
? LEFT(lcbuffer, 1)
This should take the language aspect out of the equation.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform