CLIPBOARD Object
Updated: Sep 24, 2005

The familiar cut and paste actions illustrate CLIPBOARD function.

The Clipboard provides a means to store and retrieve various types of data
blocks from text to images.  This service may be used within an application or
to provide a simple, easily used media of communication between applications.

Code may open the CLIPBOARD to get data or claim "ownership" by .Clear of the
CLIPBOARD and put its own data on the CLIPBOARD. It is suggested that CLIPBOARD
be closed with .Close to allow other applications to have write access.


PROPERTIES (Read/Write):
~~~~~~~~~~ ~~~~~~~~~~~~~
Format     Registers string as a CLIPBOARD format.

           CLIPBOARD.Format = "xyz_image"

           Gets last format used.  Default = 1

Text       Puts string on CLIPBOARD as text.

           CLIPBOARD.Text = "MyProgram was here"

           Gets text from CLIPBOARD; string$ = CLIPBOARD.Text


PROPERTIES (Read Only String):
~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
GetAsText  (length) Get length bytes of CLIPBOARD text.


PROPERTIES (Read Only Numeric):
~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
FormatCount
           Number of different formats on CLIPBOARD

GetAsHandle
           (format) Get handle of data with format

           CBhandle = CLIPBOARD.GetAsHandle(1) 'text

HasFormat  (format) True (non-zero) if format present. 

           HasText = CLIPBOARD.HasFormat(1) 'text


METHODS    Arguments & Comments
~~~~~~~    ~~~~~~~~~~~~~~~~~~~~
Clear      Clears CLIPBOARD and gets "right" to write to CLIPBOARD.

Close      Closes CLIPBOARD  

Open       Opens CLIPBOARD

SetAsHandle
           (format, handle) Add CLIPBOARD item of format as a
           handle for the referenced data.

           CLIPBOARD.SetAsHandle(1,MyText$.Handle)

SetAsText  (string$) Puts string$ on CLIPBOARD as text; same as .Text.

           CLIPBOARD.SetAsText(MyText$)


###########
Please see hotclip.bas in the HotTrial download for an example and tutorial on
CLIPBOARD coding.

Copyright 2003-2005 James J Keene PhD
Original Publication: Oct 9, 2003
