最简单的办法就是"欺骗"系统,让他认为点中的是窗体的标题行
unit Dragmain;interfaceusesSysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,Forms, Dialogs, StdCtrls;typeTForm1 = class(TForm)Button1: TButton;procedure Button1Click(Sender: TObject);privateprocedure WMNCHitTest(var M: TWMNCHitTest); message wm_NCHitTest;end;varForm1: TForm1;implementation{$R *.DFM}procedure TForm1.WMNCHitTest(var M: TWMNCHitTest);begininherited; { call the inherited message handler }if M.Result = htClient then { is the click in the client ...[ 查看全文 ]