Re: Add a context menu item to Windows Explorer (Win98) with VB6?
- From: "Kevin Provance" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 15 Oct 2008 15:55:55 -0400
I should point out that this will fail under Windows Vista, FWIW.
"Eduardo" <mm@xxxxxx> wrote in message news:gd58cb$i3e$1@xxxxxxxxxxx
| "MM" <kylix_is@xxxxxxxxxxx> escribió en el mensaje
| news:h93cf4danhcuie7r4r1tc679sdv78vkhbl@xxxxxxxxxx
| > Okay, before I start searching the web or delving through my extensive
| > library, which could take days, here's what I want to do:
| >
| > Write a VB6 program. No problem. Program accepts one or more text
| > files (may have any extension).
| >
| > In Windows Explorer I select the files and right click.
| >
| > The context menu shows a new command (the one I will have added).
| >
| > I click on the item and the files are processed in some way.
| >
| > Finished.
| >
| > --------------------------------
| >
| > In VB6, has someone done this already? Or similar code that I can
| > modify?
| >
| > (I don't want to reinvent the wheel!)
|
| Look here: http://www.freevbcode.com/ShowCode.Asp?ID=322
|
| Modify the function CreateFileAssociation adding another parameter
(Variant)
| with name "CommandName" or something like that, an optional parameter.
| Then change the line:
|
| If bAns Then bAns = WriteStringToRegistry(HKEY_CLASSES_ROOT, _
| sExtName & "\shell\open\command", "", AppCommand)
|
| to:
|
| If bAns Then bAns = WriteStringToRegistry(HKEY_CLASSES_ROOT, _
| sExtName & "\shell\" & CommandName & "\command", "", AppCommand)
|
| Since this parameter is optional, then at the begining of the function add
| this:
|
| If IsMissing (CommandName) Then CommandName = "open"
|
| > Thanks!
| >
| > MM
|
|
.
- References:
- Prev by Date: Re: visual basic 6 - help looping through checkboxes
- Next by Date: Sending keystrokes to 3rd party window
- Previous by thread: Re: Add a context menu item to Windows Explorer (Win98) with VB6?
- Next by thread: Re: Add a context menu item to Windows Explorer (Win98) with VB6?
- Index(es):
Relevant Pages
|