
Geschrieben von
gix
am 12.04.2007 um 00:00 Uhr.
Beiträge: 185 /
#1210
Kontakt:
Mailen
|
ICQ
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
Private Declare Function GetSystemDefaultLCID Lib _
"kernel32" () As Long
Private Declare Function GetLocaleInfo Lib "kernel32" _
Alias "GetLocaleInfoA" (ByVal Locale As Long, _
ByVal LCType As Long, ByVal lpLCData As String, _
ByVal cchData As Long) As Long
Const LOCALE_SCOUNTRY = &H6
Private Function GetEntry(ID&) As String
Dim LCID&, Result&, Buffer$, Length&
LCID = GetSystemDefaultLCID()
Length = GetLocaleInfo(LCID, ID, Buffer, 0) - 1
Buffer = Space(Length + 1)
Result = GetLocaleInfo(LCID, ID, Buffer, Length)
GetEntry = Left$(Buffer, Length)
End Function
Private Sub Form_Load()
MsgBox GetEntry(LOCALE_SCOUNTRY), , "Ländereinstellung"
End Sub