unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TForm1 = class(TForm)
private
procedure WMNCHITTEST(var Msg: TMessage); message WM_NCHITTEST;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.WMNCHITTEST(var Msg: TMessage);
begin
Inherited;
if Msg.Result = HTCLOSE then
ShowMessage('鼠标别往这放,一边凉快去!');
end;
end.