本文整理自网络,侵删。
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 tms web core messagedlg对话框 yes no
Delphi waitforsingleobject 响应窗体
Delphi isipadress 非正则表达式验证ip的方法
更多相关阅读请进入《Delphi》频道 >>