'KCMLReadClipboard(sText$, nLen)
Reads CF_TEXT formatted data from the Windows clipboard.
Arguments
STR() | sText$ | [out] | The string to be filled. |
INT() | nLen | [in] | Size of the string variable |
Returns
The number of characters transferred to sText$ or -1 on failure. An empty clipboard will return 0.
Syntax
The following definition is built into KCML. You do not have to include it in your own code.
$DECLARE 'KCMLReadClipboard(RETURN STR(), INT())
Remarks
This function will read a string of text from the clipboard into the buffer$ parameter. The maximum length of the data to receive is passed in the bufsize parameter. It expects the clipboard to contain text in CF_TEXT clipboard format.
Example
The following program will obtain the length of the data in the clipboard using the KCMLGetClipboardLength function, and then read it into a buffer using this function.
DIM a$0 clipsize = 'KCMLGetClipboardLength() MAT REDIM a$clipsize + 1 'KCMLReadClipboard(a$, clipsize)
Further Information
Introduced | KCML 5.00 |
Compatibility | KClient |
See Also