Hi Everybody,
How can I detect what region a computer is set up for (Canada, United States etc...)
Thanks,
Jeff
# include "fivewin.ch"
#define HKEY_CURRENT_USER 2147483649
FUNCTION Main()
Local oReg, cCountry
oReg := TReg32():New(HKEY_CURRENT_USER, "Control Panel\International", .f. )
cCountry := oReg:Get( "sCountry", '' )
MsgInfo(cCountry)
oReg:Close()
RETURN NIL
# include "fivewin.ch"
#define HKEY_CURRENT_USER 2147483649
FUNCTION CountryArea()
Local oReg, nCountry
oReg := TReg32():New(HKEY_CURRENT_USER, "Control Panel\International", .f. )
nCountry := oReg:Get( "iCountry", '' )
MsgInfo(cCountry)
oReg:Close()
RETURN nCountry
# include "fivewin.ch"
# define LOCALE_ICOUNTRY 5
# define LOCALE_SCOUNTRY 6
# define LOCALE_SENGCOUNTRY 4098
# define LOCALE_SABBREVCTRYNAME 7
FUNCTION Main()
LOCAL strCountry := Space(128)
GetLocInfoA( GetSystemDefaultLCID(), LOCALE_SENGCOUNTRY, @strCountry,128)
MsgInfo(strCountry)
RETURN NIL
DLL32 FUNCTION GetLocInfoA;
( Locale AS LONG, ;
LCType AS LONG, ;
lpLCData AS STRING, ;
cchData AS LONG ) ;
AS LONG PASCAL;
FROM "GetLocaleInfoA" LIB "KERNEL32"
DLL32 FUNCTION GetSystemDefaultLCID();
AS LONG PASCAL;
FROM "GetSystemDefaultLCID" LIB "KERNEL32"
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: W3C [Validator] and 88 guests