Board index » delphi » Drag-and-Drop Desktop Icons

Drag-and-Drop Desktop Icons

 Windows Desktop Icons (Drag-and-Drop):

I've got some Windows Icons which are shorcuts to text files formatted in a
particular way.
I would like to pick up one of these icons and drop it on a Delphi form in
such a way that
the form is filled with the information contained in the text file
associated to that icon.

Any ideas of WHERE to start?

Thanks.

Daniel Rosenbaum
Daniel.Rosenb...@ukd.pontis.com

 

Re:Drag-and-Drop Desktop Icons


I've just posted 2 freeware components (& source) at
Torry's Delphi Pages which enable file drag and drop
FROM and TO applications.
(TDragFilesSrc and TDragFilesTrg)

Use TDragFilesTrg to enable dragging from the desktop
(or Explorer) to your app.
In the OnDrop method find the target file of
the shortcut (you may need some help with that!),
and then open the file.

Angus Johnson
ajohn...@rpi.net.au_NO_SPAMS_

Daniel Rosenbaum <rosen...@ukd.pontis.com> wrote in article
<875282658.28327.0.nnrp-06.c246a...@news.demon.co.uk>...

Quote
>  Windows Desktop Icons (Drag-and-Drop):

> I've got some Windows Icons which are shorcuts to text files formatted in
a
> particular way.
> I would like to pick up one of these icons and drop it on a Delphi form
in
> such a way that
> the form is filled with the information contained in the text file
> associated to that icon.

> Any ideas of WHERE to start?

> Thanks.

> Daniel Rosenbaum
> Daniel.Rosenb...@ukd.pontis.com

Re:Drag-and-Drop Desktop Icons


My shopping list for know-how would be:

-The Windows API calls to register your form to accept dropped files.
-The Windows COM calls to get the information out of a shortcut.
-Anything you might wanna do to convert these documents into a rich-text file
and how to create a TConverter (did i get this one right?) to process files in
a TRichEdit in my own way.

( i think the TConversion/TConverter thingie is the easiest of 'm all *grin*)

Dave.

Re:Drag-and-Drop Desktop Icons


On 27 Sep 1997 00:26:56 GMT, "Angus Johnson" <ajohn...@rpi.net.au>
wrote:

Quote
>I've just posted 2 freeware components (& source) at
>Torry's Delphi Pages which enable file drag and drop
>FROM and TO applications.
>(TDragFilesSrc and TDragFilesTrg)

Hi Angus,

TDragFilesTrg compiled well with Delphi 3.0, but I'm having problems
with the TDragFilesSrc sourcecode. Do you have any information on
porting Delphi 2.0 OLE code to Delphi 3.0?

Other Threads