Error processing SSI file
(Leadtools.Controls)

Show in webframe

Copy Method




Handle to the active window (use HandleControl.Handle).
The image to be copied.
Indicates how image data is placed on the clipboard.
Copies the RGB or raster image data from a specified image to the Windows clipboard.
Syntax
'Declaration
 
Public Shared Sub Copy( _
   ByVal owner As IntPtr, _
   ByVal image As RasterImage, _
   ByVal flags As RasterClipboardCopyFlags _
) 

Parameters

owner
Handle to the active window (use HandleControl.Handle).
image
The image to be copied.
flags
Indicates how image data is placed on the clipboard.
Remarks
The clipboard will contain the same Width, Height, BitsPerPixel, and color Order as the image.
Example

This example loads a bitmap using clipboard data, if available

Copy Code  
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs

Public Sub RasterClipboard_Copy(ByVal imageViewer As ImageViewer)
   Using codec As RasterCodecs = New RasterCodecs()
      ' Load a bitmap, keeping its own bits per pixel
      Dim image As RasterImage = codec.Load(Path.Combine(ImagesPath.Path, "Image1.cmp"), 1)
      ' Copy the bitmap to the clipboard
      RasterClipboard.Copy(imageViewer.Handle, image, RasterClipboardCopyFlags.Empty Or RasterClipboardCopyFlags.Dib)
      ' Dispose the original bitmap, leaving the copy in the clipboard
      image.Dispose()
   End Using

   MessageBox.Show("Image copied to clipboard")
End Sub
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;

public void RasterClipboard_Copy()
{
   using (RasterCodecs codec = new RasterCodecs())
   {
      // Load a bitmap, keeping its own bits per pixel
      RasterImage image = codec.Load(Path.Combine(ImagesPath.Path, "Image1.cmp"), 1);
      // Copy the bitmap to the clipboard
      RasterClipboard.Copy(_imageViewer.Handle, image, RasterClipboardCopyFlags.Empty | RasterClipboardCopyFlags.Dib);
      // Dispose the original bitmap, leaving the copy in the clipboard
      image.Dispose();
   }

   MessageBox.Show("Image copied to clipboard");
}
Requirements

Target Platforms

See Also

Reference

RasterClipboard Class
RasterClipboard Members

Error processing SSI file