Hi Dave,
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/d...cs_programming/transferring/datascenarios.asp
Yes, this is the same article I was talking about.
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. =(
Actually what the drop target sees is COM interfaces so using DataObject or
not should be the same.
Reading you post I guess that the problem is in the data formats you
receive. It looks like your program is looking for format that don't exist
when you drag out from you application. Usually, programs like MSWord or
WordPad provide very rich dataobjects in terms of data formats. Thus the
chances that you find the format you want are big.
For example when I look at what the DataObject has when I set simple text I
get:
- System.String - this won't be understand by non-.NET application
- Unknown Clipboard Format
- CF_TEXT - almost all application will understand that
If you are not looking for any of the formats above you will not be able to
accept anything dropped form .NET application.
So, my suggestion is to use IDataObject-Viewer tool to check what the
differences in the formats comming form .NET and non-.NET applications are.
In cases that you haven't use that tool you can find it in the VS .NET
folder
in my computer it is located in
C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools\Bin\dobjview.exe
Just drag and drop some stuff on the tool window and it will show formats
the data carries.
And then you can make sure that your .NET application puts the same format
in the DataObject.
You said *mshtml stuff* if you are looking for HTML data format you'll find
such data comming from MSWord or IE for example but you won't find it if you
have string containing na HTML page and just do
new DataObject(str);
You should do
new DataObject(DataFormats,Html, str);
So make sure that the format(s) you are looking for comes when the drag is
originated from your application
HTH
B\rgds
100