Show: Delphi C++
Display Preferences

Adding the Clipboard Object

From RAD Studio
Jump to: navigation, search

Go Up to Working with Text in Controls

Most text-handling applications provide users with a way to move selected text between documents, including documents in different applications. TClipboard object encapsulates a clipboard (such as the Windows Clipboard) and includes methods for cutting, copying, and pasting text (and other formats, including graphics). The Clipboard object is declared in the Clipbrd unit.

To add the Clipboard object to an application (Delphi)

  1. Select the unit that will use the clipboard.
  2. Search for the implementation reserved word.
  3. Add Clipbrd to the uses clause below implementation.
    • If there is already a uses clause in the implementation part, add Clipbrd to the end of it.
    • If there is not already a uses clause, add one that says
 uses Clipbrd;

For example, in an application with a child window, the uses clause in the unit's implementation part might look like this:

 uses
   MDIFrame, Clipbrd;

To add the Clipboard object to an application (C++)

  1. Select the unit that will use the clipboard.
  2. In the form's header file (.h), add
#include <vcl\Clipbrd.hpp>

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance