Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2007 Feb : How to detect Settings Change in Windows
| Subject: | How to detect Settings Change in Windows |
| Posted by: | "Neo" (neomav..@hotmail.com) |
| Date: | Fri, 16 Feb 2007 17:28:08 |
Hello to all.
I'm working with 6 Delphi and Win 2000 I want to detect when a user
changes the decimalSeparator in in Control Panel. But I am not able to
do it. My code is the following one.
interface
TForm1 = class(TForm)
ApplicationEvents1: TApplicationEvents;
.....
procedure PCSettingChanged(var Message: TMessage); message
WM_SETTINGCHANGE ;
implementation
procedure TForm1.PCSettingChanged(var Message: TMessage);
var WMessage : TWMSettingChange ;
begin
Application.BringToFront ;
WMessage := TWMSettingChange(Message) ;
ShowMessage( 'Section: ' + WMessage.Section + #13 +
'Flag: ' + IntToStr(WMessage.Flag) ) ;
The Procedure is 'fired" but the Flag parameter always is the same: 0.
I've try with a TApplicationEvents component and its OnSettingChange
event, but is the same problem, the parameter flag always is 0.
How I can detect only the change of the decimalseparator in Windows
Control Panel?
Any idea will be welcome
Regards
Neo