首页 相关文章 全部窗体可使用鼠标中移动

全部窗体可使用鼠标中移动

  最简单的办法就是"欺骗"系统,让他认为点中的是窗体的标题行

  

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 ...[ 查看全文 ]

2016-02-19 标签:

全部窗体可使用鼠标中移动的相关文章

手机页面
收藏网站 回到头部