So I'm making a .Net Application and I have this textbox that is supposed to have the contents of your clipboard in it. But the Clipboard.GetText() does not import anything into the textbox, I've tried replacing it with "Hello World" and it works fine.
Code snippet:
bool running = true;
public void GetClipboard()
{
while (running)
{
CurrentCopied.Text = Clipboard.GetText();
System.Threading.Thread.Sleep(500);
}
}
public Main()
{
InitializeComponent();
ThreadStart CopyThreadStart = new ThreadStart(GetClipboard);
Thread CopyThread = new Thread(CopyThreadStart);
CopyThread.Start();
}