magicmanam.Windows.ClipboardViewer 1.0.3

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package magicmanam.Windows.ClipboardViewer --version 1.0.3
NuGet\Install-Package magicmanam.Windows.ClipboardViewer -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="magicmanam.Windows.ClipboardViewer" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add magicmanam.Windows.ClipboardViewer --version 1.0.3
#r "nuget: magicmanam.Windows.ClipboardViewer, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install magicmanam.Windows.ClipboardViewer as a Cake Addin
#addin nuget:?package=magicmanam.Windows.ClipboardViewer&version=1.0.3

// Install magicmanam.Windows.ClipboardViewer as a Cake Tool
#tool nuget:?package=magicmanam.Windows.ClipboardViewer&version=1.0.3

magicmanam.Windows.ClipboardViewer

magicmanam.Windows.ClipboardViewer nuget package is a simple wrapper over Windows ClipboardViewer.

In order to add it to your solution, run Install-Package magicmanam.Windows.ClipboardViewer from your NuGet Package Manager console in Visual Studio. Sample of code you can find below:

using magicmanam.Windows;
using magicmanam.Windows.ClipboardViewer;

class Form {
  private ClipboardViewer _clipboardViewer;

  protected override void WndProc(ref Message m)
  {
    if (m.Msg == Messages.WM_CREATE)
    {// Create clipboard viewer wrapper
      this._clipboardViewer = new ClipboardViewer(this.Handle);

      // To make sure that the viewer still gets clipboard events (well-known Windows issue with customer viewers),
      // Start call the line below every n-seconds (create a timer or some other way)
      // this._clipboardViewer.RefreshViewer();
    }
    else if (this._clipboardViewer != null)
    {// Process well-known Windows messages
      this._clipboardViewer.HandleWindowsMessage(m.Msg, m.WParam, m.LParam);
    }

    if (m.Msg == Messages.WM_DRAWCLIPBOARD)
    {
      // After registering clipboard viewer you can get this event
      // and retrieve clipboard object as below
      var dataObject = System.Windows.Forms.Clipboard.GetDataObject();
    }

    base.WndProc(ref m);
  }
}

License

MIT

Thanks

I want to say thanks to the author of the Nuget icon: https://www.iconsdb.com/royal-blue-icons/copy-icon.html

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 439 10/20/2021
1.0.3 387 8/3/2021
1.0.2 796 9/30/2018
1.0.1 1,122 5/27/2018

Updates the package info