SET PICTURE TO CLIPBOARD

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.0


SET PICTURE TO CLIPBOARD (picture)

ParameterTypeDescription
picturePicturePicture whose copy is to be put into the Clipboard

Description

SET PICTURE TO CLIPBOARD clears the Clipboard and puts a copy of the picture you passed in picture into the Clipboard.

After you have put a picture into the Clipboard, you can retrieve it using the command GET PICTURE FROM CLIPBOARD or by calling GET CLIPBOARD ("PICT";...).

If the picture is correctly put in the Clipboard, the OK variable is set to 1. If there is not enough memory to put a copy of the picture into the Clipboard, the OK variable is set to 0, but no error is generated.

Example

Using a floating window, you display a form that contains the array asEmployeeName, which lists the names of the employees from an [Employees] table. Each time you click on a name, you want to copy the employee's picture to the Clipboard. In the object method for the array, you write:

   If (asEmployeeName#0)
      QUERY ([Employees];[Employees]Last name=asEmployeeName{asEmployeeName})
      If (Picture size ([Employees]Photo)>0)
         SET PICTURE TO CLIPBOARD ([Employees]Photo)  ` Copy the employee's photo
      Else
         CLEAR CLIPBOARD  ` No photo or no record found
      End if
   End if

See Also

APPEND TO CLIPBOARD, GET PICTURE FROM CLIPBOARD.

System Variables or Sets

If a copy of the picture is correctly put into the Clipboard, the OK variable is set to 1.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next