wunderwaffe: рабочее (Default)
[personal profile] wunderwaffe

Каковое имеет место быть -

для текста -

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; 
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

wunderwaffe: рабочее (Default)
доктор Вандершпигель

April 2022

S M T W T F S
     12
34567 89
1011 12 1314 1516
17181920212223
24252627282930

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 14th, 2025 04:46 pm
Powered by Dreamwidth Studios