unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs;<br><br>type<br> TForm1 = class(TForm)<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> protected<br> procedure WMNCLButtonDblClk(var Message : TWMNCLButtonDblClk); message WM_NCLBUTTONDBLCLK;<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br>{ TForm1 }<br><br>procedure TForm1.WMNCLButtonDblClk(var Message: TWMNCLButtonDblClk);<br>begin<br> if (Message.HitTest = HTCAPTION) then<br> ShowMessage('截获双击标题栏消息')<br> else<br> inherited; {Call default processing.}<br>end;<br><br>end.<br>