PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Writes text or image information into the system clipboard.
To write RTF Text information, use ToClipboardRTF.
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App You only have the ability to write text information into the Windows clipboard.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the 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.
New in version 18
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.
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 in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
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")
END
Syntax

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 (with quotes)
Text that will be written into the clipboard.
Windows Mobile This text must correspond to the character string that will be written into the clipboard. If the text is found in a control, the name of control containing the text cannot be used directly. We advise you to use the syntax: <Control Name>..Value.
WINDEVReports and QueriesJavaUser code (UMC)

Copying an image into the clipboard Hide the details

<Result> = ToClipboard(<Image>)
<Result>: Boolean
  • True if the image was copied into the clipboard,
  • False otherwise.
<Image>: Character string (without quotes) or Image variable
  • Name of Image control that will be copied into 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
    Name of Image variable that will be copied into the clipboard.
    New in version 17
    Name of Image variable that will be copied into the clipboard.
    Name of Image variable that will be copied into the clipboard.
Remarks
  • ToClipboard can be used to manage the cut/copy/paste feature for text or image information (BMP).
  • Clipboard is used to read the clipboard content. The information other than text or image information (binary, etc.) found in the clipboard cannot be read by Clipboard.
  • The information in RTF format is managed by ToClipboardRTF and ClipboardRTF.
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.
Components
WINDEVReports and Queries wd230std.dll
Windows Mobile wp230std.dll
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment