Difference between revisions of "Clipboard.Picture"

From Xojo Documentation

Line 5: Line 5:
| scope=public
| scope=public
| type=[[Picture]]
| type=[[Picture]]
| platform=all
| project=Desktop

Latest revision as of 21:31, 9 December 2020

Property (As Picture )
aClipboard.Picture = newPictureValue
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