Results 1 to 4 of 4

Thread: Context Menu - Multi Selected Files - One Instance

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Context Menu - Multi Selected Files - One Instance

    I created an item in the context menu of Window Explorer. I hooked the exe to:

    HKEY_CLASSES_ROOT\*\SHELL
    HKEY_CLASSES_ROOT\Directory\shell
    HKEY_CLASSES_ROOT\Folder\shell

    It works fine on single files!

    Only problem is when I select multiple files, it runs multiple instance of the exe hooked to that context menu.

    How can I make it so that it take in all selected files as parameters but only fires off the instance only once? Similar to a software called "Beyond Compare".

    Does it have to do something with the registry - Reg_Multi_SZ with %1?
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Context Menu - Multi Selected Files - One Instance

    try %1 %2 %3 etc
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Re: Context Menu - Multi Selected Files - One Instance

    What if the number of files being selected can vary - nth?
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Re: Context Menu - Multi Selected Files - One Instance

    Quote Originally Posted by westconn1
    try %1 %2 %3 etc
    According to this link that RobDogg provided:
    http://msdn2.microsoft.com/en-us/lib...20(VS.85).aspx

    %2 %3 %4 are backward compatibility for Window 3.1 for printers and other stuffs.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width