/*
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 include <Clipbrd.hpp>.
*/ 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  if (Clipboard()->HasFormat(CF_TEXT))
    Edit1->Text = Clipboard()->AsText;
  else
    Application->MessageBox("The clipboard does not contain text.", NULL, MB_OK);
} 
