Re: Drag drop is driving me INSANE! by Michael
Michael
Tue Jul 12 16:51:02 CDT 2005
Correction...I am sorry about that. You can create your
own implementation of IDropTarget which will allow you to
use an IDataObject instead of a .Net DataObject.
You will then be able to get the data rendered in the format
of your choice. If it is available!
"Michael Phillips, Jr." <mphillips53@nospam.jun0.c0m> wrote in message
news:%23y1JmoyhFHA.1052@TK2MSFTNGP10.phx.gbl...
> The .Net Frameworks DataObject does not render all formats
> that are available to an IDataObject implementation.
>
> GetFormats tells you all of the formats that are available for a
> particular IDataObject implementation.
>
> GetDataPresent tells you that a particular format is available
> to be rendered.
>
> GetData get the data rendered in the format that you request.
>
> If GetData returns null, then the DataObject can't render that format.
> However, that format is available but the DataObject implementation can't
> get it for you.
>
> You can implement your own IDataObject and support the formats that
> you need for your application.
>
> "William Sullivan" <WilliamSullivan@discussions.microsoft.com> wrote in
> message news:8D7B038F-4DCD-46EF-9AC5-6CC439ACE17A@microsoft.com...
>> Why is it that:
>> e.Data.GetDataPresent("WindowsForms10PersistentObject") returns true, and
>> e.Data.GetData("WindowsForms10PersistentObject") returns null?
>>
>> Is it Friday yet?
>
>