Multiple files with shell extension ?(vb.net)


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Multiple files with shell extension ?(vb.net)

  1. #1
    Join Date
    Sep 2006
    Posts
    1

    Multiple files with shell extension ?(vb.net)

    I have some problem to get this to work . When I select more then 1 file and click on shell extension then it open 1 program for 1 file , so if I open 10 files it open 10 of my program.


    The program should take the filepath and add it to a listbox when i use the shell extension.


    But if i drag and drop the files on the exe file then it works without any problem.

  2. #2
    Join Date
    Apr 2004
    Location
    New York City
    Posts
    538
    That is the way Shell Extensions work when you access them the way I suspect you are, by setting a value in the Registry, like this: http://www.codeproject.com/useritems...ontextMenu.asp .

    To do what you want, you need to write a shell extension .DLL file in C++.

    After trying to do this on my own, unsuccessfully, for a while, I found this .NET DLL, Mini-XMenus, that lets you do what you want, and more, without having to write your own .DLL: http://www.mini-tools.com/components/xmenus/index.htm

    You can download a full evaluation version for free, and it's very inexpensive to buy the full product. It does everything you want and more. There are no royalties when you distribute your app, unlike some products.

    The early versions were a little shaky in terms of the quality of the samples and the documentation, but the latest version, 3.0, seems to have fixed those issues. I am working on an app using their product, and plan on purchasing the full version if it continues to work as well as it has so far.

    It's a little tricky to debug any shell extension, because you have to stop and restart the Explorer.EXE process (part of Windows) to unload the extension in order to re-compile your code, and you have to keep un-registering and re-registering the .DLL; but the programmers of this .DLL have included a little helper app that will take care of all that for you, making the process as easy as it could possibly be.

    I recommend you check Mini-XMenus out; AFAIK, this product, or another similar one (if there even are any out there), is the only way to do what you are asking about, other than writing the .DLL yourself. The samples, tutorials, and templates are fairly extensive; while it takes a little bit of work to get your head around how it all works, it's a lot more work to have to write your own C++ .DLL file, and then have to do all this too!

    And, no, I don't have any connection whatsoever to the company! ;-)

    I just like their product, and it's the only one I've found that allows you to extend the Windows context menu beyond the simple ways possible by adding your app to the Shell Registry key.


    HTH,


    -Andrew

Similar Threads

  1. Replies: 7
    Last Post: 03-17-2008, 11:18 AM
  2. Replies: 8
    Last Post: 06-01-2006, 11:07 AM
  3. Executing multiple SQL files
    By Mike in forum Database
    Replies: 9
    Last Post: 04-11-2002, 12:39 PM
  4. Replies: 1
    Last Post: 03-09-2001, 09:49 AM
  5. Generating multiple text files.
    By frewini in forum XML
    Replies: 0
    Last Post: 01-05-2001, 02:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center