interface
 
uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
 
type
  TForm1 = class(TForm)
  private
    { Private declarations }
  protected
    procedure WMNCHitTest(var M: TWMNCHitTest);
         message WM_NCHitTest;
 
  public
    { Public declarations }
  end;
 
var
  Form1: TForm1;
 
implementation
 
{$R *.DFM}
procedure TForm1.WMNCHitTest(var M: TWMNCHitTest);
begin
  inherited;                    
  //继承原有的消息处理函数
  if  M.Result = htClient then
  //判断消息结果是否htClient,是则将此结果改成htCaption
 M.Result := htCaption;  
end;
 
 
end.

 

posted on 2015-04-09 14:50  lypzxy  阅读(154)  评论(0编辑  收藏  举报