码迷,mamicode.com
首页 > Windows程序 > 详细

Delphi 拖动

时间:2015-04-09 15:05:49      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:

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.

 

Delphi 拖动

标签:

原文地址:http://www.cnblogs.com/cb168/p/4409657.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!