title image


Smiley TIPP Windows Dezimaltrennzeichen + Zifferblocktrennzeichen ermitteln
Das geht so:



Public Const LOCALE_SCURRENCY = &H14

Public Const LOCALE_SDECIMAL = &HE

Public Const LOCALE_SGROUPING = &H10

Public Const LOCALE_STHOUSAND = &HF



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



Private Declare Function SetLocaleInfo Lib "kernel32" Alias _

"SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As _

Long, ByVal lpLCData As String) As Long



Public Function GetDecimal()

Dim Res As Long, Tmp As String

Tmp = String(6, 0)

Res = GetLocaleInfo(GetSystemDefaultLCID(), LOCALE_SDECIMAL, Tmp, Len(Tmp))

GetDecimal = Left(Tmp, Res - 1)

End Function



Public Function GetGrouping()

Dim Res As Long, Tmp As String

Tmp = String(6, 0)

Res = GetLocaleInfo(GetSystemDefaultLCID(), LOCALE_SGROUPING, Tmp, Len(Tmp))

GetGrouping = Left(Tmp, Res - 1)

End Function



Public Function GetThousand()

Dim Res As Long, Tmp As String

Tmp = String(6, 0)

Res = GetLocaleInfo(GetSystemDefaultLCID(), LOCALE_STHOUSAND, Tmp, Len(Tmp))

GetThousand = Left(Tmp, Res - 1)

End Function



Public Sub SetDecimal(S As String)

Dim Res As Long, Tmp As String

Res = SetLocaleInfo(GetSystemDefaultLCID(), LOCALE_SDECIMAL, S)

End Sub



Public Sub SetGrouping(S As String)

Dim Res As Long, Tmp As String

Res = SetLocaleInfo(GetSystemDefaultLCID(), LOCALE_SGROUPING, S)

End Sub



Public Sub SetThousand(S As String)

Dim Res As Long, Tmp As String

Res = SetLocaleInfo(GetSystemDefaultLCID(), LOCALE_STHOUSAND, S)

End Sub



Gruß aus dem Norden
Reinhard


Bitte immer die Access-Version angeben!
DB-Wiki


Wie man Fragen richtig stellt

YaccessAccess-FAQUnd ansonsten: Wikipedia




geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: