title: Why do I get multiple windows messages of same kind?
body: <p>I'm trying to respond to some windows <strike>and application</strike> messages, but I get them multiple times. </p>
  
  <p>For example, I write the following code to show a message box when the date of system is changed using WM_TIMECHANGE. WMTimeChange is executed more than once, and I see multiples (most times two or three) messageboxes one behind another. Maybe, I am missing something?</p>
  
  <pre><code>unit Unit1;
  
  interface
  
  uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs;
  
  type
    TForm1 = class(TForm)
    protected
      procedure WMTimeChange(var Msg: TMessage) ; message WM_TIMECHANGE;
    end;
  
  var
    Form1: TForm1;
  
  implementation
  
  {$R *.dfm}
  
  { TForm1 }
  
  procedure TForm1.WMTimeChange(var Msg: TMessage);
  begin
      showmessage('Date/Time has changed!');
  end;
  
  end.
  </code></pre>
  
  <p>Testing in Windows XP.</p>
  
  <p>EDIT: Just to clarify, my intention is understand <strong>WHY</strong> that happen and not how to get around the multiple calls. Anyway, if an answer to that is not possible, I will probably accept one answer to the later.</p>
  
  <p>EDIT2: Removed Delphi Tag as it seems not a Delphi issue.</p>