You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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?Thanks!
The text was updated successfully, but these errors were encountered: