
(*
 Delphi Object and Component Reference
# {bmc bm18.BMP} {bmc bm10.BMP} HasFormat, AsText example
This example uses a button and an edit control on a form. When the user clicks the button, 
any text on the clipboard is pasted into the edit control.  If there is no text on the 
clipboard, a message box appears.
Note:	To use this example, you must add Clipbrd to the uses clause.
*) 
procedure TForm1.Button1Click(Sender: TObject);
begin
if Clipboard.HasFormat(CF_TEXT) then
  begin
  Edit1.Text := Clipboard.AsText
  Clipboard.Clear;
  end
else
  MessageDlg('There is no text on the Clipboard', mtInformation,
        [mbOK],0);
end; 
