delphi xe7 fmx 复制到剪切板

unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, System.Rtti,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Platform;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.Button1Click(Sender: TObject);
var
  Clipboard: IFMXClipboardService;  //  FMX.Platform
  Value: TValue; // System.Rtti
begin
  if TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService,
IInterface(Clipboard)) then
  begin
    Value := TValue.From('http://jondy.net');
    Clipboard.SetClipboard(Value);
  end;
end;


end.

你可能感兴趣的:(Delphi,/,Win32SDK)