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
  • 44,653
  • 17
  • 114
  • 109
Stepan Loginov
  • 1,579
  • 4
  • 19
  • 45

0 Answers0