Apr 6, 2005 #1 gcaramia Programmer Joined Oct 30, 2003 Messages 185 Location IT Is it possible to change the windows regional settings permanently from inside D7 program? Thanks Giovanni Caramia
Is it possible to change the windows regional settings permanently from inside D7 program? Thanks Giovanni Caramia
Apr 7, 2005 #2 Nordlund Programmer Joined Jul 17, 2001 Messages 458 Location SE Permanently... Maybe it's possible, but are you sure you want to do that. isn't it enough to change it by session. Then you can use the built in global variables like "Thousandseparator" and more //Nordlund Upvote 0 Downvote
Permanently... Maybe it's possible, but are you sure you want to do that. isn't it enough to change it by session. Then you can use the built in global variables like "Thousandseparator" and more //Nordlund
Apr 7, 2005 Thread starter #3 gcaramia Programmer Joined Oct 30, 2003 Messages 185 Location IT with 'permanently' i mean to change settings in windows, the same as we can do from control panel/regional settings. what i'm looking for is how to change ThousandSeparators and DecimalSeparator. I found how to change time format: Code: var Locale : LongInt; begin Locale := GetUserDefaultLCID(); SetLocaleInfo(Locale, LOCALE_STIMEFORMAT, 'HH:mm:ss'); SendMessage(HWND_BROADCAST,WM_WININICHANGE,0,0); now, for numbers? Upvote 0 Downvote
with 'permanently' i mean to change settings in windows, the same as we can do from control panel/regional settings. what i'm looking for is how to change ThousandSeparators and DecimalSeparator. I found how to change time format: Code: var Locale : LongInt; begin Locale := GetUserDefaultLCID(); SetLocaleInfo(Locale, LOCALE_STIMEFORMAT, 'HH:mm:ss'); SendMessage(HWND_BROADCAST,WM_WININICHANGE,0,0); now, for numbers?
Apr 7, 2005 Thread starter #4 gcaramia Programmer Joined Oct 30, 2003 Messages 185 Location IT Solved (from Delphi-Help): Code: var Locale : LongInt; begin Locale := GetUserDefaultLCID(); SetLocaleInfo(Locale, LOCALE_SThousand, ''''); SetLocaleInfo(Locale, LOCALE_SDecimal, '.'); SendMessage(HWND_BROADCAST,WM_WININICHANGE,0,0); This for everyone who needs Giovanni Caramia Upvote 0 Downvote
Solved (from Delphi-Help): Code: var Locale : LongInt; begin Locale := GetUserDefaultLCID(); SetLocaleInfo(Locale, LOCALE_SThousand, ''''); SetLocaleInfo(Locale, LOCALE_SDecimal, '.'); SendMessage(HWND_BROADCAST,WM_WININICHANGE,0,0); This for everyone who needs Giovanni Caramia