Take the 2-minute tour ×  I have a program that uses clipboard
but I want to restore the clipboard to its former state after I
am done with it.  This is my code :  IDataObject temp =
Clipboard.GetDataObject();  //Some stuff that change Cliboard
here //Some stuff that change Cliboard here     share|improve
this question What is this, WinForms? WPF? –  Jeff Mercado Jun 7
'11 at 8:26 Windows form application –  user779444 Jun 7 '11 at
9:03 add comment  3 Answers  up vote 1 down vote accepted  I
cannot confirm whether this will work, but I see no reason why
you shouldn't be able to back up the data using the longer
approach of actually reading the data and restoring it
afterwards.  Read here: http://msdn.microsoft.com/en-
us/library/system.windows.forms.idataobject.aspx  You would do
something like (pseudo-code)  var lBackup = new
Dictionary<string, object>(); var lDataObject =
Clipboard.GetDataObject(); var lFormats =
lDataObject.GetFormats(false); foreach(var lFormat in lFormats)
lBackup.Add(lFormat, lDataObje