Marco,
If you assign the result of "ido.GetData(DataFormats.FileDrop)" to an
object, and look at it in the debugger, you should see the type of the
object that is returned.
ido is the IDataObject implementation though, the object returned will
not implement it.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"Marco Osvaldo" <(E-Mail Removed)> wrote in message
news:41da87f7$0$8202$(E-Mail Removed)...
> Hi to all, I would like to be able to copy & paste a file.
> I think the file type in WinXP is the DataFormats.FileDrop. So I have an
> object
> ...
> IDataObject myObject = (IDataObject) ido.GetData(DataFormats.FileDrop);
> ...
> but I receive this error:
>
> "An unhandled exception of type 'System.InvalidCastException' occurred in
> WindowsApplication1.exe
> Additional information: Specified cast is not valid."
>
> Any ideas?
>
>