Clipboard.Picture

From Xojo Documentation

Revision as of 21:31, 9 December 2020 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Property (As Picture )
aClipboard.Picture = newPictureValue
or
PictureValue = aClipboard.Picture

Supported on Desktop.

The picture on the Clipboard.

Sample Code

This code is in the Action event of a button. It tests whether a picture is on the Clipboard. If so, it assigns it to the Backdrop property of the Canvas. This causes the picture to appear in the control. It will be cropped to the size of the Canvas.

Var c As Clipboard

// create a new instance of the clipboard
c = New Clipboard

// check to see if a picture is available
If c.PictureAvailable Then
Var myPicture As Picture
myPicture = c.Picture // get the picture
Canvas1.Backdrop = myPicture // set the backdrop
End If

// close the clipboard
c.Close