注意:

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

实例代码:

 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. 度量Web性能的关键指标

    自网站诞生以来,响应速度/响应时间一直都是大家关心的话题,而速度慢乃是网站的一个杀手,正当大家以为四核和宽带能力的提升能够解决这些问题时,Wi-Fi和移动设备为热点移动互联网又悄然兴起. 在2006年 ...

  2. c# 使用api函数 ShowWindowAsync 控制窗体

    1.需要匯入 System.Runtime.InteropServices 命名空間 2.宣告 ShowWindowAsync 函數 [DllImport("user32.dll" ...

  3. facebook开源的adb 工具,解决adb连不上手机的问题

    一. fb-adb.fb-adb(https://github.com/facebook/fb-adb)

  4. java创建二叉树并递归遍历二叉树

    二叉树类代码: package binarytree; import linkqueue.LinkQueue; public class BinaryTree { class Node { publi ...

  5. jenkins+gitlab钩子+shell脚本基于git的tag实现App增量更新

    转自:http://blog.csdn.net/kingboyworld/article/details/54175330 环境安装 jdk1.8 1.安装jenkins 首先到https://jen ...

  6. python字符串操作大全

    1.去空格 strip() >>> s = 'a b c d ' >>> s.strip() 'a b c d' 2.lstrip() 方法用于截掉字符串左边的空格 ...

  7. 【jQuery+html】JS如何在html页面获取PHP输出的变量

    如题:JS如何获取php输出到模板HTML的变量呢? 废话不多说,自己看. aa.html <!-- 前提在HTML文件中--> <script type="text/ja ...

  8. C#:转换类型(待补充)

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace MyCo ...

  9. [Unity3D]Unity+Android交互教程——让手机&quot;动&quot;起来

    想要用Unity实现一个二维码扫描的功能,然后网上找插件,找到一个貌似叫EasyCodeScanner,但下载下来用用.真不好使,一导入执行就报错.调好错了再执行发现点button没反应.重复试了几遍 ...

  10. 和求余运算巧妙结合的jns指令

    .text:004A78B1  and eax, 80000001h.text:004A78B6  jns short loc_4A78BD.text:004A78B8 dec eax.text:00 ...