AnsweredAssumed Answered

vrf Win API - Locale

Question asked by mwills on Nov 16, 2004
Hi Shaun,

Many thanks for the pointer that was exactly what I wanted to know.

I can already access the information that I require using Vee and the Win
API so I'll have to pass on the whipped up automation library.

Thanks anyway and I'm sure judging by all of the other stuff that you just
"whip" up it would be worth the fee, anyway it gives a mere mortal like me
the chance to learn some more stuff.

Regards,
Mark

-----Original Message-----
From: Shawn Fessenden [mailto:shawn@testech-ltd.com]
Sent: 16 November 2004 17:17
To: Wills, Mark; 'VRF'
Subject: RE: [vrf] Win API - Locale


> I'm wondering if somebody can point me in the right direction.

You're pretty much in the right ball park. If you look up the function
EnumSystemLocales you'll find the root for investigation of locale
information. Unfortunately, you can't actually use EnumSystemLocales with
VEEs 6 or 7 because of this weird callback problem, but you can do it in
Visual Basic or C/C++.

At the bottom of that page, you'll find a link to National Language Support
Overview and National Language Support Functions. Some of the functions in
the NLSF group you'll be interested in are GetCurrencyFormat, GetDateFormat
and GetTimeFormat. These functions are located in kernel32. I didn't go
looking, but I'm sure you can find them (or their equivalents - they're not
likely to be named the same) in the .NET FCL too.

One easy option to access this functionality is to use the VBA Format
function which can use the default locale. This function can be accessed
from any control or automation library that references VBA. The script
control seems to be very popular: it's free and redistributable also.

If you like I can whip up an automation library specifically for VEE
tailored to your needs for a fee.
-SHAWN-

---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes