0

I need to use the clipboard for my own purposes. But I want to restore the previous clipboard state after using it.

I tried to do something like this:

var tmp = Clipboard.GetDataObject();
// My work with clipboard
Clipboard.SetDataObject(tmp);

But the clipboard is empty after this. What did I miss?

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
Stepan Loginov
  • 1,667
  • 4
  • 22
  • 49

0 Answers0