Add to Windows Explorer Context Menu? 
Author Message
 Add to Windows Explorer Context Menu?

To make it work for all files, create a key:
HKEY_CLASSES_ROOT\*\shell\Add To Playlist (or whatever) and make the default
value your menu text:
  "Add To Playlist"

Under that key, create a key: Command

For the default value in the Command key:  YourProgramPath %1

That will cause your program to be started when the menu is clicked. You can
get the file path by checking Command at program startup:
Dim s as string
 s = Command
 If s <> "" then   '--......the menu was clicked and s is the selected file
path.

--
--

Quote:
> What I want to do is probably easy or impossible.
> I want to add an option to the Windows Explorer
> context menu (i.e., the pop-up menu that shows
> up when you right-click on a filename in Windows
> Explorer).

> Let's call the new option "Add to Playlist."  What
> I want to happen if someone chooses that option is
> simply to append the name of the file (including
> path, if possible) to a particular text file (we
> can call that C:\playlist.txt).

> What I don't know how to do (and it may or may not
> be possible to do) is (1) add the "Add to Playlist"
> option to the Windows Explorer right-click menu,
> (2) make it so that choosing that option makes a
> Visual Basic program run, and (3) pass to the VB
> program the name of the file where the right-click
> took place (the VB program would then append the
> filename to C:\playlist.txt, but that's the simple part).

> Is this kind of thing possible to do in VB?  If so,
> is there a tutorial anywhere on how to do something
> like this?  (I've seen various commercial programs
> add new options to the Windows Explorer right-click
> menu, so I know that can be done, but I don't know
> if it can be done from Visual Basic.)



Sat, 17 Jan 2004 00:35:11 GMT  
 Add to Windows Explorer Context Menu?
On Mon, 30 Jul 2001 12:35:11 -0400, "mayayana1"

Quote:

>To make it work for all files, create a key:
>HKEY_CLASSES_ROOT\*\shell\Add To Playlist (or whatever) and make the default
>value your menu text:
>  "Add To Playlist"

>Under that key, create a key: Command

>For the default value in the Command key:  YourProgramPath %1

>That will cause your program to be started when the menu is clicked. You can
>get the file path by checking Command at program startup:
>Dim s as string
> s = Command
> If s <> "" then   '--......the menu was clicked and s is the selected file
>path.

Hmm....  It looks like it may require more knowledge than I have right
now to do something like this (especially when I was hoping to be able
to include this feature in a program that other people might install
on _their_ computers).

Is there a tutorial anywhere (or perhaps even commented source code)
that might go into more detail on how to add a new item to the context
menu for files (i.e., the menu that you get when you right-click on a
file in My Computer or Windows Explorer)?  Thanks!



Mon, 02 Feb 2004 16:13:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to add a menu into the Explorer Context Menu

2. Adding Menu Entries to Windows Context menu

3. Adding to the Explorer Context Sensitive Menus

4. Adding Entries to the Standard Context Menu in Internet Explorer for all users

5. Adding Context Menu to Explorer Shell

6. Adding Items to Windows Explorer Menus.

7. Add application to Windows 95 Explorer Right Mouse Menu

8. Adding item to Windows Explorer's menus

9. Disable context menu or close context menu

10. Registry question - Explorer context menus

11. Explorer context menus???

12. Explorer Context Menu

 

 
Powered by phpBB® Forum Software