•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 455,992 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,796 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser: Programming Forums
Views: 2817 | Replies: 10
![]() |
•
•
Join Date: Jun 2006
Location: Blumenau, Brazil
Posts: 71
Reputation:
Rep Power: 3
Solved Threads: 4
•
•
•
•
I write Same code And I can Change Registry
But I mast restart computer after runing code for making effect on time Format
is any way that dont need to restart system
It was a procedure called SetTimeFormat with a litle compiler error (it's true): the parameter was bad named.
But, you don't reply or report me this mistake, and I don't have perceived: I had put tfType24 but must be ftType24.
delphi Syntax (Toggle Plain Text)
procedure SetTimeFormat(ftType24 :Boolean) var Changed :Boolean; LCID :LongInt; begin LCID := GetSystemDefaultLCID; if ftType24 then // if format type is 24 hours... Changed := SetLocaleInfo(LCID, LOCALE_STIMEFORMAT, 'HH:mm:ss') else // if format type is 12 hours AM/PM Changed := SetLocaleInfo(LCID, LOCALE_STIMEFORMAT, 'hh:mm:ss'); if Changed then // if no error then notify all app that settings changed SendMessage(HWND_TOPMOST, WM_SETTINGCHANGE, 0, 0); end;
This procedure work right to me.
No access to register and no computer restart are necessary.
Bye
"It always has, at least, two ways to make one same thing. Exactly that they are certain and wrong"(Micheus)
Brazil - Blumenau
Brazil - Blumenau
![]() |
•
•
•
•
•
•
•
•
DaniWeb Pascal and Delphi Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- memory management in wndows 2000 (Windows NT / 2000 / XP / 2003)
- Open In New Window Php (PHP)
- Changing Time format (Pascal and Delphi)
- Sony ICD-R100 recorder in windows XP (Windows NT / 2000 / XP / 2003)
- Formatting HD (Windows NT / 2000 / XP / 2003)
- Can't format hard drive! (Troubleshooting Dead Machines)
- Changing permission for www/html directory (Window and Desktop Managers)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: Adding Listbox Items
- Next Thread: bar image reset problem


Linear Mode