Copies the RGB or raster image data from a specified image to the Windows clipboard.
public static void Copy(
IWin32Window owner,
Leadtools.RasterImage image,
Leadtools.Winforms.RasterClipboardCopyFlags flags
)
Public Shared Sub Copy( _
ByVal owner As IWin32Window, _
ByVal image As Leadtools.RasterImage, _
ByVal flags As Leadtools.Winforms.RasterClipboardCopyFlags _
)
public:
static void Copy(
IWin32Window^ owner,
Leadtools.RasterImage^ image,
Leadtools.Winforms.RasterClipboardCopyFlags flags
)
owner
Handle to the active window.
image
The image to be copied.
flags
Indicates how image data is placed on the clipboard.
The clipboard will contain the same Leadtools.RasterImage.Width, Leadtools.RasterImage.Height, Leadtools.RasterImage.BitsPerPixel, and color Leadtools.RasterImage.Order as the image.
This example loads a bitmap using clipboard data, if available
Imports Leadtools.WinForms
Imports Leadtools
Imports Leadtools.Codecs
Public Sub RasterClipboard_Copy(ByVal viewer As RasterImageViewer)
Dim codec As RasterCodecs = New RasterCodecs()
' Load a bitmap, keeping its own bits per pixel
Dim image As RasterImage = codec.Load(Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp"))
' Copy the bitmap to the clipboard
RasterClipboard.Copy(viewer, image, RasterClipboardCopyFlags.Empty Or RasterClipboardCopyFlags.Dib)
' Dispose the original bitmap, leaving the copy in the clipboard
image.Dispose()
MessageBox.Show("Image copied to clipboard")
End Sub
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
public void RasterClipboard_Copy(RasterImageViewer viewer)
{
RasterCodecs codec = new RasterCodecs();
// Load a bitmap, keeping its own bits per pixel
RasterImage image = codec.Load(Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp"));
// Copy the bitmap to the clipboard
RasterClipboard.Copy(viewer, image, RasterClipboardCopyFlags.Empty | RasterClipboardCopyFlags.Dib);
// Dispose the original bitmap, leaving the copy in the clipboard
image.Dispose();
MessageBox.Show("Image copied to clipboard");
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
Products |
Support |
Feedback: Copy Method - Leadtools.WinForms |
Introduction |
Help Version 19.0.2017.3.22
|
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.