Каковое имеет место быть -
для текста -
text/plain
Application/X-Laz-SynEdit-Tagged
application/x-ms-locale
text/plain
application/x-ms-oemtext
для картинки -
image/bmp
image/bmp
unit Unit1;
{$mode objfpc}{$H+}
interface uses Classes, Clipbrd, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
public
procedure CheckClipboard();
end;
var
Form1: TForm1;
cc:tclipboard;
implementation uses FileUtil, lcltype; {$R *.lfm} { TForm1 }
procedure TForm1.CheckClipboard();
var i:integer;
List:TStringList;
s:string;
begin
memo1.clear;
List:=TStringList.Create;
try
cc.SupportedFormats(List);
for i:=0 to List.Count-1 do begin
s:=List.Strings[i];
if cc.HasFormatName(List.Strings[i]) then s:=s+' yes';
memo1.Lines.Add(s);
end;
finally
List.Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
CheckClipboard();
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
cc:=tclipboard.Create;
end;