Board index » delphi » How can shortcut accept files ?

How can shortcut accept files ?

Hello !

How can a shortcut (of my application) accept files ?

Look:
First i make a shortcut of my delphi application on a desktop.
Now, if i drop some files on that shortcut, my application starts and
here i would like to detect, which files are dropped on the shortcut.

Please help on email,
Thanks !

|=============================================================|
| Iztok Kovac                                                 |
|-------------------------------------------------------------|
| E-mail   :                                  iko...@amis.net |
|-------------------------------------------------------------|
| Home page:                      http://home.amis.net/metrix |
|=============================================================|

 

Re:How can shortcut accept files ?


Use the ParamCount and ParamStr functions.

Gilles Baatsen.

Quote
Iztok Kovac wrote in message <366E2214.840B9...@amis.net>...
>Hello !

>How can a shortcut (of my application) accept files ?

>Look:
>First i make a shortcut of my delphi application on a desktop.
>Now, if i drop some files on that shortcut, my application starts and
>here i would like to detect, which files are dropped on the shortcut.

>Please help on email,
>Thanks !

>|=============================================================|
>| Iztok Kovac                                                 |
>|-------------------------------------------------------------|
>| E-mail   :                                  iko...@amis.net |
>|-------------------------------------------------------------|
>| Home page:                      http://home.amis.net/metrix |
>|=============================================================|

Re:How can shortcut accept files ?


Check out the ParamStr() function.  

for I := 1 to ParamCount do
begin
  {Do something with ParamStr(I)}
end;

Hope this helps!
--

Rodney E Geraghty
GERA-Tech
Ottawa, Canada
gera...@ibm.net

Iztok Kovac <iko...@amis.net> wrote in article
<366E2214.840B9...@amis.net>...

Quote
> Hello !

> How can a shortcut (of my application) accept files ?

> Look:
> First i make a shortcut of my delphi application on a desktop.
> Now, if i drop some files on that shortcut, my application starts and
> here i would like to detect, which files are dropped on the shortcut.

> Please help on email,
> Thanks !

> |=============================================================|
> | Iztok Kovac                                                 |
> |-------------------------------------------------------------|
> | E-mail   :                                  iko...@amis.net |
> |-------------------------------------------------------------|
> | Home page:                      http://home.amis.net/metrix |
> |=============================================================|

Re:How can shortcut accept files ?


Try displaying the ParamStr[1] in a TLabel.

ie.  Label1.Caption:=ParamStr[1];

Other Threads