Board index » delphi » How to use SendTo?

How to use SendTo?

Hi,

 does anybody know how to send files to the Sendto items (Just like in
explorer)?

--

CIAO/2 Christian

 

Re:How to use SendTo?


Quote
>   Christian Fridgen <cfrid...@primus.baynet.de> writes:
>   does anybody know how to send files to the Sendto items (Just like in
>  explorer)?

There is a function that you can use to execute a file and if that filetype is associated with a program windows will activate the program much as using sendto. But I do
not remember the name of the function.

If you like to add things in the send to menu you simply put an alias of that program in the sendto folder in the windows folder.

johan

Re:How to use SendTo?


Hi johan,

Quote
jo...@lindgren.pp.se wrote:
> There is a function that you can use to execute a file and if that filetype is associated with a program windows will activate the program much as using sendto. But I do
> not remember the name of the function.

If you speak of shellExecute/Shell ExecuteEx, this doesn't seem to work. I tried to execute the *.lnk files with my files as parameters and nothing happend

--

CIAO/2 Christian

Re:How to use SendTo?


Quote
>   Christian Fridgen <cfrid...@primus.baynet.de> writes:
>  If you speak of shellExecute/Shell ExecuteEx, this doesn't seem to work. I tried to execute the *.lnk files with my files as parameters and nothing happend

I am sorry to be so unprecise. But it is quite some time since I looked at this.
But I do not think that you should execute the link.
Just execute file file and I think that Windows will know which proper program to open it with.

But if you want to send one type of document to another program this wont work. As sending a htm file to notepad instead of the default browser.

I guess you will have to find the corresponding program and execute that with the file as a parameter.

johan

Re:How to use SendTo?


Hi Johan,

Quote
> I am sorry to be so unprecise. But it is quite some time since I looked at this.
> But I do not think that you should execute the link.
> Just execute file file and I think that Windows will know which proper program to open it with.

doesn't matter any bit of help would be appreciated... But I don't want to execute my files (at an other place in my programm I want to, but this works fine with
shellexecute), but want to send them to the entries in sendto.

Quote
> But if you want to send one type of document to another program this wont work. As sending a htm file to notepad instead of the default browser.

> I guess you will have to find the corresponding program and execute that with the file as a parameter.

this works as long as the SendTo entry ist a link to a programm. I can get the name of the exefile and shellExecute the Exe wiht my file as parameter. But i.e.
the entries created by the MS Powertools (send to clipboard etc) are no executeables but should work only via a shellcall (at least I think so)

--

CIAO/2 Christian

Re:How to use SendTo?


Christian,

ShellExecute works with .LNK files; the trick is to NOT specify
the file extension.

HTH

Ken
--
Ken White
kwh...@westelcom.com

Clipper Functions for Delphi
http://members.aol.com/clipfunc/

Quote
Christian Fridgen wrote:

> Hi johan,

> jo...@lindgren.pp.se wrote:

> > There is a function that you can use to execute a file and if that filetype is associated with a program windows will activate the program much as using sendto. But I do
> > not remember the name of the function.

> If you speak of shellExecute/Shell ExecuteEx, this doesn't seem to work. I tried to execute the *.lnk files with my files as parameters and nothing happend

> --

> CIAO/2 Christian

Re:How to use SendTo?


Hi Ken,

Quote
> ShellExecute works with .LNK files; the trick is to NOT specify
> the file extension.

you are right, ShellExecute works, but not the way I need, it just opens the folder/application, but I need to use them just like in SendTo. I think I should look for the
DragDropHandlers of the items, maybe I'll find there something....

--

CIAO/2 Christian

Other Threads