WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Writes text or image information into the system clipboard.
To write RTF Text information, use ToClipboardRTF.
Text is string
Res is int
// The content of the control is copied into the clipboard
Text = EDT_EDIT1
Res = ToClipboard(Text)
IF Res = False THEN
Error("Error while writing into the clipboard")

Writing a text into the clipboard Hide the details

<Result> = ToClipboard(<Text>)
<Result>: Boolean
  • True if the text was copied into the clipboard,
  • False otherwise.
<Text>: Character string
Text that will be written into the clipboard.
  • ToClipboard can be used to manage the cut/copy/paste feature for text or image information (BMP).
  • Clipboard is used to read the contents of the clipboard. Clipboard cannot be used to read any type of information other than text or image (e.g., binary, etc.) in the clipboard.
  • ToClipboardRTF and ClipboardRTF are used to manage information in RTF.
Related Examples:
The TableTo functions Unit examples (WINDEV): The TableTo functions
[ + ] Exporting table data with the WLanguage functions.
The following topics are presented in this example:
1/ interfacing with Word and Excel
2/ sending data to the clipboard
3/ generating a text file
This example explains how to export the content of a table to a Word document, an Excel workbook, the clipboard or a text file via the following WLanguage functions: TableToWord, TableToExcel, ToClipboard, TableToText.
Business / UI classification: UI Code
Component: wd280std.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment