Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2008, 04:55 PM
>>Terabyte<< >>Terabyte<< is offline
Senior Member
 
Join Date: Aug 2003
Posts: 592
Default Add to context menu

Hi,

I've the following code to add an entry to the context menu,
Only thing is, this only works on individual files,
so suppose I want to select multiple files, the menu doesn't appear.
Anybody know which registry entries I should modify in order to get a context menu entry when multiple files (or folders) are selected?

Code:
 Reg := Tregistry.create;
  with Reg Do
  begin
  RootKey := HKEY_CLASSES_ROOT;
  OpenKey('Directory\shell',false);
  if not KeyExists('Upload Folder') then CreateKey('Upload Folder');
  CloseKey;
  OpenKey('Directory\shell\Upload Folder',False);
  WriteString('','Upload Folder');
  if not KeyExists('command') then CreateKey('command');
  Closekey;
  OpenKey('Directory\shell\Upload Folder\command',true);
  WriteString('',Application.ExeName + ' %1');
  CloseKey;
  end;
  with Reg Do
  begin
  RootKey := HKEY_CLASSES_ROOT;
  OpenKey('*\shell',false);
  if not KeyExists('Upload File') then CreateKey('Upload File');
      CloseKey;
      OpenKey('*\shell\Upload File',False);
      WriteString('','Upload File');
      if not KeyExists('command') then CreateKey('command');
      Closekey;
      OpenKey('*\shell\Upload File\command',true);
      WriteString('',Application.ExeName + ' %1');
      CloseKey;
end;
Reply With Quote
  #2  
Old 02-17-2008, 09:37 AM
chris_w chris_w is offline
Senior Member
 
Join Date: Jan 2004
Posts: 1,397
Default RE: Add to context menu

http://www.delphipages.com/result.cfm?ID=2750

Take a look at the source for this component.

Chris
Reply With Quote
  #3  
Old 07-11-2010, 01:22 PM
sofarplanet sofarplanet is offline
Junior Member
 
Join Date: Jul 2010
Posts: 1
Default

Anyone can help of this issue?, I got the same problem.
Reply With Quote
  #4  
Old 07-13-2010, 02:44 AM
abcd abcd is offline
Senior Member
 
Join Date: Nov 2009
Posts: 132
Default

try to find "shell extension"
Reply With Quote
  #5  
Old 07-13-2010, 05:51 PM
masman masman is offline
Member
 
Join Date: May 2010
Posts: 47
Default

you can hook into the hint event of an object with your own code by loading an address into it's .OnshowHint event. Then your code will be called as an replacement. You can then redirect the hints to a status bar (common use) or create your own show hint code.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 12:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.