-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I've been trying to use this library in a .NET 7.0 Windows console app, but even after registering a simple delegate against ClipboardChanged, I can't get it to fire at all. As the initial documentation describes using it in VS with the Designer, I thought I'd better check - can I expect it to work at all in my use case, or will it only work in a Forms app or similar?
using System;
using WK.Libraries.SharpClipboardNS;
namespace ExampleApp
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Starting.");
var clipboard = new SharpClipboard();
clipboard.ClipboardChanged += ClipboardChanged;
while(true)
{
}
}
private static void ClipboardChanged(Object sender, SharpClipboard.ClipboardChangedEventArgs e)
{
Console.WriteLine("Change detected.");
Console.WriteLine(e.Content.ToString());
}
}
}
Thanks!
Metadata
Metadata
Assignees
Labels
No labels