Copies image data from the clipboard.
Syntax
Parameters
- owner
- Handle to the active window.
Return Value
A reference to a new RasterImage object created using the data in the Windows clipboard.
Example
This example loads a bitmap using clipboard data, if available
Visual Basic | Copy Code |
---|
Public Sub RasterClipboard_Paste(ByVal viewer As RasterImageViewer)
If RasterClipboard.IsReady Then
viewer.Image = RasterClipboard.Paste(viewer)
Console.WriteLine("Paste is Successful")
Else
Console.WriteLine("Paste Failed")
End If
End Sub |
C# | Copy Code |
---|
public void RasterClipboard_Paste(RasterImageViewer viewer) { if (RasterClipboard.IsReady) { /// Copy the bitmap from the clipboard viewer.Image = RasterClipboard.Paste(viewer); Console.WriteLine("Paste is Successful"); } else { Console.WriteLine("Paste Failed"); } } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also