注意:

可以实现效果,但不知道我的用法对不对(或着说是不是最优化的用法),望高手们指教。

实例代码:

 unit Unit1;

 interface

 uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects; type
TForm1 = class(TForm)
Image1: TImage;
procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Single);
procedure FormCreate(Sender: TObject);
procedure Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
procedure Image1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end; var
Form1: TForm1; implementation {$R *.fmx}
var IsDrag: Boolean; procedure TForm1.FormShow(Sender: TObject);
begin
Self.BorderStyle := TFmxFormBorderStyle.None; //窗体样式
Image1.WrapMode := TImageWrapMode.Stretch; //图片加载方式
end; procedure TForm1.FormCreate(Sender: TObject);
begin
IsDrag := False;
end; procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
begin
if ssLeft in Shift then
begin
IsDrag := True;
end;
end; procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Single);
begin
if IsDrag = True then
Self.StartWindowDrag
else
begin
//
end;
end; procedure TForm1.Image1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
begin
IsDrag := False;
end; end.

DelphiXE8FMX工程实现无边框托动(FMX内部方法)的更多相关文章

  1. DelphiXE8FMX工程实现无边框托动(发送消息)

    1.引用单元 uses Winapi.Windows, FMX.Platform.Win, Winapi.Messages; 2.发送消息 //发送系统消息SendMessage(FmxHandleT ...

  2. Delphi中拖动无边框窗口的5种方法

    1.MouseMove事件中加入: // ReleaseCapture;// Perform(WM_SYSCOMMAND, $F017 , 0); 2.MouseDown事件中加入: // POSTM ...

  3. C# 改变无边框窗体尺寸大小的方法

    ; ; ; ; ; ; const int HTBOTTOMLEFT = 0x10; ; protected override void WndProc(ref Message m) { switch ...

  4. 如何在pyqt中给无边框窗口添加DWM环绕阴影

    前言 在之前的博客<如何在pyqt中通过调用SetWindowCompositionAttribute实现Win10亚克力效果>中,我们实现了窗口的亚克力效果,同时也用SetWindowC ...

  5. 无边框窗体、用户控件、Timer控件

    一.无边框窗体1 最大化.最小化以及关闭按钮制作实际上就是更换点击前.指向时.点击时的图片 (1)将图片放在该文件夹的Debug中,获取图片的路径Application.StartupPath + & ...

  6. 无边框窗体和timer控件

    一.无边框窗体 1.控制按钮如何制作就是放置可以点击的控件,不局限于使用按钮或是什么别的,只要放置的控件可以点击能触发点击事件就可以了 做的好看一点,就是鼠标移入(pictureBox1_MouseE ...

  7. winform(无边框窗体与timer)

    一.无边框窗体 1.控制按钮如何制作就是放置可以点击的控件,不局限于使用按钮或是什么别的,只要放置的控件可以点击能触发点击事件就可以了 做的好看一点,就是鼠标移入(pictureBox1_MouseE ...

  8. pyqt4制作透明无边框窗体

    用PyQt做了一个无边框登陆窗口,效果如下: 下面是代码: # -*- coding: utf-8 -*- from PyQt4 import QtGui ,Qt ,QtCore image=QtGu ...

  9. WinForm 无边框窗体和timer控件

    一.无边框窗体 1.控制按钮如何制作就是放置可以点击的控件,不局限于使用按钮或是什么别的,只要可以点击能触发点击事件就可以了 做的好看一点,就是鼠标移入,移出,按下三个事件会让按钮改变样式 如何获取图 ...

随机推荐

  1. TensorFlow目标检测(object_detection)api使用

    https://github.com/tensorflow/models/tree/master/research/object_detection 深度学习目标检测模型全面综述:Faster R-C ...

  2. hello-循环神经网络(RNN)原理

    主要的应用:机器翻译,自然语言处理,文本处理,语音识别, 图像描述生成 (Generating Image Descriptions), 图像问答QA.... 循环神经网络(RNN)原理通俗解释 1. ...

  3. 如何在android模拟器中导入搜狗输入法?

    1.下载输入法程序,如:sogouinput_android_1.6_sweb.apk 2.然后cmd进入sdk的tools(有的是platform-tools)目录,输入adb install C: ...

  4. Spark学习散点总结

    使用Spark 时,通常会有两种模式.一.在交互式编程环境(REPL, a.k.a spark-shell)下实现一些代码,测试一些功能点.二.像MapReduce 那样提前编写好源代码并编译打包(仅 ...

  5. idea maven项目模块中的Content Root

  6. [AngularJS] Angular 1.3 ng-model-options - getterSetter

    getterSetter:  boolean value which determines whether or not to treat functions bound to ngModel as ...

  7. JavaScript中isPrototypeOf函数

    转自:http://www.ijavascript.cn/shouce/javascript-isprototypeof-247.html JavaScript中 isPrototypeOf 函数方法 ...

  8. C#基础视频教程1 背景知识和安装配置

    安装过程比较简单,用虚拟光驱工具加载ISO文件,然后打开EXE安装即可,主要使用VS2013(VS2015也出来了,但是用的还不算多)     建议设置为深色(比较容易看清)   建议显示行号,不要自 ...

  9. Fireworks如何制作透明窗口PNG

    1 做好的透明PNG窗口如图所示,打开之后可以发现其实分层的PNG和Photoshop打开一个PSD文件类似. 2 但是Photoshop并不会像Fireworks一样可以编辑分层的PNG,在打开分层 ...

  10. Python网络爬虫 - 1. 准备工作

    1. 安装Beautiful Soup 下载地址 http://www.crummy.com/software/BeautifulSoup/bs4/download/4.4/ 解压后,进入根目录 控制 ...