uses ClipBrd;
...
SomeStringData := Clipboard.AsText
uses ClipBrd;
...
if Clipboard.HasFormat(CF_TEXT) then
SomeStringData := Clipboard.AsText
else
ShowMessage('No text in the Clipboard');
procedure TForm1.Button2Click(Sender: TObject);
begin
//the following line will select
//ALL the text in the edit control
{Edit1.SelectAll;}
Edit1.CopyToClipboard;
end;
uses ClipBrd;
...
if Clipboard.HasFormat(CF_METAFILEPICT) then
ShowMessage('Clipboard has metafile');
Clipboard.Assign(MyBitmap);
{place one button and one image control on form1}
{Prior to executing this code press
Alt-PrintScreen key combination}
uses clipbrd;
procedure TForm1.Button1Click(Sender: TObject);
begin
if Clipboard.HasFormat(CF_BITMAP) then
Image1.Picture.Bitmap.Assign(Clipboard);
end;