Board index » delphi » URL drop from IE

URL drop from IE

Hi Guru's...

After many hours of searching DejaNews, various Delphi sites and testing
ump{*word*249} components and sources, I just don't seem to be able to accept
dropped URL's...

Most of the time I can get a form to accept a list of dropped Filenames
from Windows Explorer and such, but URL's from IE never work.

Does anyone have the definitive solution to this?  Many articles I have
read claim to do so, but I haven't seen one work yet.

Thanks in advance,
Simon Perry (aka Pezz)
pezz@#NOSPAM#webaxs.net

 

Re:URL drop from IE


Quote
In article <MPG.10591d16d740fb1d989...@news.ozemail.com.au>, Pezz wrote:
> After many hours of searching DejaNews, various Delphi sites and testing
> ump{*word*249} components and sources, I just don't seem to be able to accept
> dropped URL's...

> Most of the time I can get a form to accept a list of dropped Filenames
> from Windows Explorer and such, but URL's from IE never work.

You need to handle 2 different clipboard formats - 'UniformResourceLocator'
and 'FileGroupDescriptor' - in your IDropTarget to get all of the
information (both the URL and the text it's linked to).  And (you're
probably not surprised!) the techniques are different for Netscape.  You
can look at the source code (very short - about 3 lines in this case) for
the precise case you're asking about, implemented using our components (see
below) at <http://www.unitoops.com/uoole/examples/urltest.htm>.  This small
application accepts links from both IE *and* Netscape and shows the URL and
the linked text in a TListView.

<BLATANT PLUG>
We are currently marketing a very polished, inexpensive, set of components
for doing exactly this kind of work.  They allow you to drag/drop text,
rich text, HTML, URLs, file lists, metafiles, bitmaps and DIBs (the latter
3 encapsulated in TPictures).  Take a look at on our web site and feel free
to download the trial version (D3/D4).  The online help is on the website
for browsing in HTML, too.

Improvements in the version to be released in the next week include:

o  the ability to drag/drop custom formats
o  the ability to drag/drop multiple formats
o  property-based access to the underlying OLE plumbing, for those who
need it.
</BLATANT PLUG>

Hope this helps.

--
Fri, 04 Sep 1998 17:07 EDT
Jim O'Brien, UnitOOPS Software
unito...@remove-this-prefix.unitoops.com
http://www.unitoops.com/

Other Threads