Delphi Fmx 把内容复制到粘贴板上支持跨平台
2022-12-24 14:33:11 作者:admin
本文整理自网络,侵删。
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.Edit, FMX.Controls.Presentation, FMX.StdCtrls;type TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.fmx}
uses FMX.Platform, System.Rtti;
procedure TForm1.Button1Click(Sender: TObject);var C: FMX.Platform.IFMXClipboardService; V: System.Rtti.TValue;begin if TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService, IInterface(C)) then begin V := TValue.From(Edit1.Text); C.SetClipboard(V); Showmessage(Edit1.Text+' 已复制'); end;end;
end. 相关阅读 >>
Delphi tgpimage 把图像转存为其他格式
Delphi中format函数的用法
Delphi 检测一个网络连接是否有效带超时
Delphi 判断文件是否被使用
Delphi 屏幕取色
Delphi enumwindows回调函数获取qq2009窗体句柄
Delphi savetextfiledialog 用法
Delphi windows 编程[2] - 学习窗体生成的过程二
Delphi 对image字段存取图片、文件
Delphi 得到 winrar 处理解压缩文件的返回值 ?
更多相关阅读请进入《Delphi》频道 >>
猜你喜欢
联络方式:
400-123-789
邮箱:xiachao@163.com
Q Q:12345678
微信公众号
微信二维码
