| {\rtf1\ansi\ansicpg1252\deff0\deflang1044{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} {\colortbl ;\red0\green0\blue255;} \viewkind4\uc1\pard\f0\fs17 The following functions return the users decimal point/seperator and thousand separator. \par \par Private Declare Function GetLocaleInfo& Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, _ \par ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) \par \par Private Const LOCALE_SDECIMAL As Long = &HE \par Private Const LOCALE_STHOUSAND As Long = &HF \par Private Const LOCALE_USER_DEFAULT As Long = &H400 \par \par \cf1 Function ThousandSeparator() As String\cf0 \par Dim lRetVal As Long, sRes As String * 10 \par lRetVal = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, sRes, 10) \par ThousandSeparator = Left$(sRes, lRetVal) \par \cf1 End Function\cf0 \par \par \cf1 Function DecimalSeparator() As String\cf0 \par Dim lRetVal As Long, sRes As String * 10 \par lRetVal = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, sRes, 10) \par DecimalSeparator = Left$(sRes, lRetVal) \par \cf1 End Function\cf0 \par } |
Returning the users decimal and thousand separator |
India web developer web development India | India web development company India ecommerce web developer