Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add menu in windows explorer

Status
Not open for further replies.

vbguy805

Programmer
Oct 17, 2006
23
0
0
US
Hi,
Any idea how to add one of menu from my application to explorer,notepad,word like how eFax have their menu in all applications?

Thank you
 
Add a shortcut to the user's SendTo folder. eg.

C:\Documents and Settings\Griffyn\SendTo

use this procedure
Code:
[navy][i]// for automatic syntax highlighting see faq102-6487[/i][/navy]
[b]uses[/b]
  Windows, ShlObj, ComObj;

[b]procedure[/b] CreateShortCut(PathObj, PathLink, Desc, Param: String);
[b]var[/b]
  IObject: IUnknown;
  SLink: IShellLink;
  PFile: IPersistFile;
[b]begin[/b]
  IObject := CreateComObject(CLSID_ShellLink);
  SLink := IObject [b]as[/b] IShellLink;
  PFile := IObject [b]as[/b] IPersistFile;
  [b]with[/b] SLink [b]do[/b]
  [b]begin[/b]
    SetArguments(PChar(Param));
    SetDescription(PChar(Desc));
    SetPath(PChar(PathObj));
  [b]end[/b];
  PFile.Save(PWChar(WideString(PathLink)), False);
[b]end[/b]; 

[b]begin[/b]
  CreateShortCut([teal]'c:\myprog.exe'[/teal], IncludeTrailingPathDelimiter(GetEnvironmentVariable([teal]'userprofile'[/teal]))
      + [teal]'SendTo\MyShortcut.lnk, '[/teal][teal]', '[/teal][teal]');
[/teal][b]end;[/b]
 
oops, left off the closing apostrophe at the end of [tt].lnk[/tt]
 
Thank you. But if you install eFax software it wont just add to "send to" link but it add menu "eFax" in windows explorer after help menu. Also it adds simillar menu in notepad,word,excel means all softwares related to documents, it add "eFax" menu.

Any idea how it can be done.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top