471,092 Members | 1,025 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

How to get Title when Drag and Drop link from IE to my app?

My C# application supports drag and drop of files, folders, shortcuts and
links from other applications into mine. This all works pretty nicely,
except that I am trying to get a little more information when a web link is
dropped onto my application from Internet Explorer.

When you drag the link in the Address bar of Internet Explorer to your
desktop, the desktop shortcut that gets created has the Title of the web page
as it’s name, and it also picks up the custom Icon for that web page. I’m
trying to figure out how to get that information out of the
DragEventArgs.Data property when the same kind of link is dropped onto my
application, but I have had no luck.

Here is a summary of what I know so far (e is the DragEventArgs):

- The e.Data.GetData(DataFormats.Text) returns the URL. This works fine.

- Some of the other DataFormats choices return the URL as well, but I’ve
tried them all and that’s all there is. No other information available in
those choices.

- I thought the e.Data.GetFormats() would tell me something, but it just
returns an empty array of strings (string[0]), so I guess that Internet
Explorer doesn’t really support that call.

- I found a solution on the web that uses
e.Data.GetData("FileGroupDescriptor") to get a System.IO.Stream that is
supposed to contain the Title of the web page, but I found that it just
contained the same URL or a reference to a file name, depending on the web

So, my question is, do you know how to get the Title of the web page when
dragging and dropping a link from IE to an application? I assume there must
be a way, since Windows can do this when you drop it on the desktop as a

Of less importance to me, but also interesting, is how can you get the
custom Icon associated with the web page?

C# Developer
Aug 21 '06 #1
1 3137
Hello, anybody out there? The MSDN subscription page claims that I should
have gotten a response within two business days, but it's been more like a
week and a half now. Any thoughts at all?
C# Developer
Aug 30 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by WindAndWaves | last post: by
6 posts views Thread by jojobar | last post: by
4 posts views Thread by kemal asad | last post: by
1 post views Thread by Just Me | last post: by
2 posts views Thread by Andreas Mueller | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.