How to preserve the contents of the clipboard
Is there a way to preserve the contents of the clipboard? I tried the following code but it doesn't work. Dim iData As IDataObject = Clipboard.GetDataObject() ...(use clipboard) Clipboard.SetDataObject(iData) Thank you. The easiest way to preserve the contents of the clipboard is to leave the clipboard alone. The clipboard is meant as a temporary storage area for the user , not for applications, so likely what you are trying to do has better solutions than to clobber the clipboard. You can use the OpenClipboard and CloseClipboard. According to MSDN opening the clipboard will keep other