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

北京外出女孩1

北京外出女孩1

2016-02-19 17:26

今天图老师小编给大家介绍下全部窗体可使用鼠标中移动,平时喜欢全部窗体可使用鼠标中移动的朋友赶紧收藏起来吧!记得点赞哦~

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

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/bianchengyuyan/)

  

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 area? }M.Result := htCaption; { if so, make Windows think its }{ on the caption bar. }end;procedure TForm1.Button1Click(Sender: TObject);beginClose;end;end.{ 下面是这个窗体的设置}object Form1: TForm1Left = 203Top = 94BorderIcons = []BorderStyle = bsNoneClientHeight = 273ClientWidth = 427Font.Color = clWindowTextFont.Height = -13Font.Name = SystemFont.Style = []PixelsPerInch = 96TextHeight = 16object Button1: TButtonLeft = 160Top = 104Width = 89Height = 33Caption = CloseTabOrder = 0OnClick = Button1Clickendend

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/bianchengyuyan/)
展开更多 50%)
分享

猜你喜欢

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

编程语言 网络编程
全部窗体可使用鼠标中移动

移动窗体

电脑网络
移动窗体

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

Win8中移动鼠标出现轨迹的设置方法

windows系统
Win8中移动鼠标出现轨迹的设置方法

PS如何在不同文档中移动图像

PS 电脑
PS如何在不同文档中移动图像

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

在ORACLE中移动数据库文件

电脑网络
在ORACLE中移动数据库文件

vb怎样限制鼠标移动

编程语言 网络编程
vb怎样限制鼠标移动

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

如何在Windows 8 中创建系统修复盘

如何在Windows 8 中创建系统修复盘

使用CSS 3新技术 完美实现圆角效果

使用CSS 3新技术 完美实现圆角效果
下拉加载更多内容 ↓