Redigera

Dela via


ClipboardProxy.GetImage Method

Definition

Retrieves an image from the Clipboard.

public:
 System::Drawing::Image ^ GetImage();
public System.Drawing.Image GetImage ();
member this.GetImage : unit -> System.Drawing.Image
Public Function GetImage () As Image

Returns

An Image representing the Clipboard image data or Nothing if the Clipboard does not contain any data that is in the Bitmap format or can be converted to that format.

Examples

This example checks to see if there is an image on the Clipboard before retrieving it and assigning it to PictureBox1.

If My.Computer.Clipboard.ContainsImage() Then
   Dim grabpicture = My.Computer.Clipboard.GetImage()
   PictureBox1.Image = grabpicture
End If

For this example to function correctly, there must be a PictureBox named PictureBox1 on your form.

Remarks

Availability by Project Type

Project type Available
Windows Application Yes
Class Library Yes
Console Application Yes
Windows Control Library Yes
Web Control Library No
Windows Service Yes
Web Site No

Applies to

See also