Copies the RGB or raster image data from a specified image to the Windows clipboard.
public static void Copy(IntPtr owner,RasterImage image,RasterClipboardCopyFlags flags)
Public Shared Sub Copy(ByVal owner As System.IntPtr,ByVal image As RasterImage,ByVal flags As RasterClipboardCopyFlags)
public:static void Copy(System::IntPtr owner,RasterImage^ image,RasterClipboardCopyFlags^ flags)
owner
Handle to the active window (use System.Windows.Forms.Control.HandleControl.Handle).
image
The image to be copied.
flags
Indicates how image data is placed on the clipboard.
The clipboard will contain the same Width, Height, BitsPerPixel, and color Order as the image.
using Leadtools;using Leadtools.Controls;using Leadtools.Codecs;using LeadtoolsExamples.Common;public void RasterClipboard_Copy(){using (RasterCodecs codec = new RasterCodecs()){// Load a bitmap, keeping its own bits per pixelRasterImage image = codec.Load(Path.Combine(ImagesPath.Path, "Image1.cmp"), 1);// Copy the bitmap to the clipboardRasterClipboard.Copy(_imageViewer.Handle, image, RasterClipboardCopyFlags.Empty | RasterClipboardCopyFlags.Dib);// Dispose the original bitmap, leaving the copy in the clipboardimage.Dispose();}MessageBox.Show("Image copied to clipboard");}
Imports LeadtoolsImports Leadtools.ControlsImports Leadtools.CodecsImports LeadtoolsControlsExamples.LeadtoolsExamples.CommonPublic Sub RasterClipboard_Copy(ByVal imageViewer As ImageViewer)Using codec As RasterCodecs = New RasterCodecs()' Load a bitmap, keeping its own bits per pixelDim image As RasterImage = codec.Load(Path.Combine(ImagesPath.Path, "Image1.cmp"), 1)' Copy the bitmap to the clipboardRasterClipboard.Copy(imageViewer.Handle, image, RasterClipboardCopyFlags.Empty Or RasterClipboardCopyFlags.Dib)' Dispose the original bitmap, leaving the copy in the clipboardimage.Dispose()End UsingMessageBox.Show("Image copied to clipboard")End Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
