ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Your version: XXF150063J

The content of this page has been updated to version 26.  See documentation 26 now.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Clipboard functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Writes text or image information into the system clipboard.
To write RTF Text information, use ToClipboardRTF.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst You only have the ability to write text information into the Windows clipboard.
New in version 15
Android This function is now available for Android applications.
Versions 16 and later
WINDEVLinux This function is now available for WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android widget mode.
Versions 21 and later
Universal Windows 10 App This function is now available for Universal Windows Platform applications.
Versions 25 and later
WEBDEV - Browser code This function is now available in browser code.
Example
Text is string
Res is int
// The content of the control is copied to the clipboard
Text = EDT_EDIT1
Res = ToClipboard(Text)
IF Res = False THEN
Error("Error while writing to the clipboard")
END
Syntax

Writing a text into the clipboard Hide the details

<Result> = ToClipboard(<Text>)
<Result>: Boolean
  • True if the text was copied to the clipboard,
  • False otherwise.
<Text>: Character string
Text that will be written into the clipboard.
WINDEVReports and QueriesJavaUser code (UMC)

Copying an image into the clipboard Hide the details

<Result> = ToClipboard(<Image> , <Transparency>)
<Result>: Boolean
  • True if the image was copied to the clipboard,
  • False otherwise.
<Image>: Character string or Image variable
  • Name of Image control that will be copied to the clipboard. If the Image control does not belong to the current window, use the following notation: <Window Name>.<Name of Image Control>.
  • Versions 17 and later
    WINDEV Name of the Image variable to be copied to the clipboard.
<Transparency>: Boolean
Versions 26 and later
WINDEV
  • True (default) to keep the transparency of the image (if possible) when it is copied to the clipboard,
  • False otherwise.
Remarks
  • 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: wd290std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help