User Tools

Site Tools


clipboard_return_windows_clipboard_contents_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== CLIPBOARD (return windows clipboard contents) ====== Previous pageReturn to chapter overviewNext page

CLIPBOARD( [format] )

blk2blue.jpg

CLIPBOARD Returns the current contents of the Windows clipboard.
format An integer constant or variable that defines the format of the clipboard's contents. If omitted, the default is CF_TEXT.

The CLIPBOARD procedure returns the current contents of the windows clipboard. The format parameter defaults to CF_TEXT (as defined in the Windows API) but any of the other CF_ values can be specified (see a Windows API reference book for details). If the data in the clipboard is not in the specified format, CLIPBOARD returns a null string (''). The following clipboard formats are predefined in the Windows API:

CF_TEXT         1

CF_BITMAP       2

CF_METAFILEPICT 3

CF_SYLK         4

CF_DIF          5

CF_TIFF         6

CF_OEMTEXT      7

CF_DIB          8

CF_PALETTE      9

CF_PENDATA      10

CF_RIFF         11

CF_WAVE         12

Return Data Type: STRING

Example:

Que1 QUEUE

     STRING(30)

    END

Que2 QUEUE

     STRING(30)

    END

WinOne WINDOW,AT(0,0,160,400)

       LIST,AT(120,0,20,20),USE(?List1),FROM(Que1),DRAGID('List1')

       LIST,AT(120,120,20,20),USE(?List2),FROM(Que2),DROPID('List1','~FILE')

      END

CODE

OPEN(WinOne)

ACCEPT

 CASE EVENT()

 OF EVENT:Drag          !When a drag event is attempted

  IF DRAGID()           !check for success

   SETCLIPBOARD(Que1)   !and setup info to pass

  END

 OF EVENT:Drop          !When drop event is successful

  Que2 = CLIPBOARD()    !get dropped info

  ADD(Que2)             !and add it to the queue

 END

END

See Also:

SETCLIPBOARD

clipboard_return_windows_clipboard_contents_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1