procedure TForm1.Button1Click(Sender: TObject);
var
buf: array[0..60] of Char;
n: Integer;
fmt: Word;
H: THandle;
P: PAnsiChar;
S:UnicodeString;
begin
for n := 0 to Clipboard.FormatCount - 1 do
begin
fmt := Clipboard.Formats[n];
Clipboard.Open;
if GetclipboardFormatName(fmt, buf, Pred(Sizeof(buf))) <> 0 then
begin
begin
H := Clipboard.GetAsHandle(fmt);
P := GlobalLock(H);
S:=UnicodeString(P);
Memo1.Lines.Add(P);
GlobalUnlock(H);
end;
end;
Clipboard.Close;
end;
end;