ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

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
Retrieves the text or image found in the system clipboard.
Remarks:
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst You can only retrieve text from the clipboard.
Example
Text is string
IF ClipboardFormat(cfText) = True THEN
Text = Clipboard()  // Clipboard content in Text
END
Syntax

Retrieving a text Hide the details

<Result> = Clipboard()
<Result>: Character string
Text in the clipboard.
Remarks
  • Clipboard reads the text or image information from the clipboard of the current system. Clipboard cannot be used to read any type of information other than text or image (e.g., binary, etc.) in the clipboard.. To read a text in RTF, use ClipboardRTF.
  • Clipboard can be used to manage the cut/copy/paste feature performed on text or image information.
  • If the content of the clipboard must be assigned multiple times to an Image control, dEndDrawing must be used between the different assignments.
  • ToClipboard is used to write into the clipboard.
  • Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst Only the Text information can be retrieved (Syntax 1).
  • AndroidAndroid Widget Starting with Android 10, if the application is in the background, it is not possible to retrieve the content of the clipboard. In this case, Clipboard will return an empty string ("").
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.
Component: wd290std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Captura a tela e salva no banco de dados
Global init project

// Include the "KeyConst.wl" file to manage the keyboard keys
EXTERN "KeyConst.WL"

In Button

Sendkey(“{PTRSC}”)

Clipboard(img_tela_capturada)

Tabela.screen = img_tela_capturada

Tabela.datahora = datesys()+timesys()

Hadd(Tabela)

Compile e teste esses comandos

Vai pressionar a tecla printscreen e salvar no banco a imagem

Precisa que seja compilado para funcionar
Boller
23 Aug. 2023

Last update: 06/22/2023

Send a report | Local help