Dear VB users,
Is it possible with the use of VB the regional settings to change.
For example I want to change the decimal symbol from “.” to “,”
Can some give me source?
Nice regards,
Michelle.
Printable View
Dear VB users,
Is it possible with the use of VB the regional settings to change.
For example I want to change the decimal symbol from “.” to “,”
Can some give me source?
Nice regards,
Michelle.
Use the SetLocaleInfo function for this.
eg
Code:Private Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Long
Private Const LOCALE_SDECIMAL = &HE ' decimal separator
Private Const LOCALE_STHOUSAND = &HF ' thousand separator
Private Const LOCALE_USER_DEFAULT = &H400
Private Sub Command1_Click()
Dim sLocale As String
Dim retVal As Long
sLocale = "."
retVal = SetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, sLocale)
End Sub