I currently have an application which is used to replace all my old
redundant links, however i want to be able to use my application to copy the shortcut to a file from the desktop to the office clipboard! I have tried the following code but it does not add the required shortcut to the clipboard, it comes back saying format not supported by clipboard. I would be grateful for any help and any sample code. Any questions please ask. My code is as follows:
System.Collections.Specialized.StringCollection files = new System.Collections.Specialized.StringCollection();
files.Add(my file here);
Clipboard.SetFileDropList(files);
Loading
Nir BarPosted Sep 23, 2009, 7:48 AM
It would be easier to debug if you posted the exception details (the type of the exception, and the inner-exception message)
However, the problem might be one of these:
- There are no strings in the collection
- One (or more) of the strings is empty/null
- One (or more) of the string contain illegal characters, a colon (:), or is too long
Please check "Accepted Answer" if this post helps youNir