Thank you 100 for your response. =) The ms-help isn't registered on
the computer I am currently on, but I believe I did find a similar, if
not the same article on MSDN.
http://msdn.microsoft.com/library/de...ascenarios.asp
I have read it and gained a some valuable insight.
The dragging of the image to the desktop was really just an example
that I thought of when asking the question. It may not have been as
proper of an example as I thought.
What I am trying to do is to use the mshtml stuff inside my .Net
application. I currently have it doing quite a bit, but the one thing
I cannot get it to do is accept a dragged string from my application.
Strings from non-dotNet apps are accepted just fine by it, but not
from any dotNet app that I have tried. This is the reason I was
attempting to use the COM IDropSource and IDataObject to create a
somewhat non-dotNet object to drop. One of the first things that I
tried was the .net DataObject that you spoke of, but that did not
help. =(
Thank you,
Dave
"100" <10*@100.com> wrote in message news:<ec**************@TK2MSFTNGP12.phx.gbl>...
Hi Dave,
I need to add the ability to drag from a Windows Form and drop into a
non dotNet application.
Yes, you can do that. .NET applications use the same technology of dragging
and dropping as the others non-.NET applications
For example, having a generated image in my
app that I wish to drag out into explorer as a friendly way to save
it.
IMHO this is not completely possible. Objects D&D over windows explorer or
the desktop may be saved in a so called *shell scrap* files. Those *scarp*
files can contain embedded or linked objects, which afterwards can be linked
or embedded in some container, but IMHO you cannot save the data in some
native format (say if you D&D images in BMP or JPG). To have the explorer
create *scrap* file from data your dragged the datao bject has to carry
CF_EMBEDEDSOURCE and/or CF_LINKSOURCE data on it. But to open *scarp* files
your application has to be OLE container. There are other options for
*cached data formats* and *delay rendering* of course but anyways you cannot
save the data in any format you want. The data will be saved in *shell
scrap* files.
I have tried creating the object that I place into the DoDragDrop() by
inheriting the COM interfaces IDropSource and IDataObject with no
luck.
You don't need to create your own classes and inherit IDataObject You can
use DataObject class provided by the framework. This class is all you need
to make D&D and store data in the clipboard.
If you want to read more for *shell scrap* files you can find some info in
MSDN
ms-help://MS.MSDNQTR.2003FEB.1033/shellcc/platform/shell/programmersguide/sh
ell_basics/shell_basics_programming/transferring/datascenarios.htm#scrap
HTH
B\rgds
100