locked
Window Explorer Context Menu RRS feed

  • Question

  • Hi,

    I'm trying to create a .dll in VB.NET that will create windows explorer context menu options.  When the user right clicks a specific type of file, I want the context menu to show 1-2 options for the user to select.  This is similar to what WinZip does with the context menu.  From what I understand, I need to somehow use the IContextMenu::QueryContextMenu Method to determine when the user has right clicked a file, and from there could use windows API calls such as InsertMenu or InsertMenuItem to actually set up the menu.  This is above my level of programming experience, so if there is anyone who can help direct me in figuring out how to add these methods to my project and setting them up it would be appreciated.

    Thanks!
    Eric

    Thursday, February 11, 2010 7:25 PM

Answers

All replies

  • Hello Eric,

     

    Thank you for your post!  I would suggest posting your question in one of the MS Forum 

    Visual Basic Developer Center > Visual Basic Forums > Visual Basic General

    located here: http://social.msdn.microsoft.com/Forums/en-us/categories/

    Have a great day!


    Shrikant Maske Tier 2 Application Support Server and Tools Online Operations Team
    • Proposed as answer by Shrikant Maske Friday, February 12, 2010 12:27 AM
    • Marked as answer by eengel821 Thursday, February 18, 2010 9:56 PM
    Friday, February 12, 2010 12:26 AM
  • Since you are asking to extending Windows Shell, I suggest you visit http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.platformsdk.shell

    Comment: writing shell extension in managed code is not supported until .Net 4.0.


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Friday, February 12, 2010 1:39 PM
  • Hi,

    I'm trying to create a .dll in VB.NET that will create windows explorer context menu options.  When the user right clicks a specific type of file, I want the context menu to show 1-2 options for the user to select.  This is similar to what WinZip does with the context menu.  From what I understand, I need to somehow use the IContextMenu::QueryContextMenu Method to determine when the user has right clicked a file, and from there could use windows API calls such as InsertMenu or InsertMenuItem to actually set up the menu.  This is above my level of programming experience, so if there is anyone who can help direct me in figuring out how to add these methods to my project and setting them up it would be appreciated.

    Thanks!
    Eric
    • Merged by Martin_Xie Thursday, February 18, 2010 8:57 AM Merge them to keep in one same topic.
    Monday, February 15, 2010 4:55 PM
  • An easier way would be to modify the registry settings for the file type, unless for some reason you need to do it from the WinAPI?
    Bill Gates look out!
    Monday, February 15, 2010 5:44 PM
  • I don't think it will be quite that easy.  When the user right clicks the first file, I need to store the file name until the second file is chosen.  When the second file is chosen, I will need to pass them as arguments into my window app.  Using the folder options won't allow me to do this as far as I know.  It would work if I was only looking to send one file to the application, but I need to send two files from potentially two different locations.

    Thanks!
    Monday, February 15, 2010 6:04 PM
  • Yea, you'll need the WinAPI for that. I would suggest asking on the Windows Development Forums, since they'll know more about the APIs you'll need and then come back here if you need any help doing what they told you to.


    Bill Gates look out!
    Monday, February 15, 2010 7:00 PM
  • I don't think it will be quite that easy.  When the user right clicks the first file, I need to store the file name until the second file is chosen.  When the second file is chosen, I will need to pass them as arguments into my window app.  Using the folder options won't allow me to do this as far as I know.  It would work if I was only looking to send one file to the application, but I need to send two files from potentially two different locations.

    Thanks!

    AFAIK, you cannot send two files from explorer to application at the same time. If the files are in the same folder, then you can pass the folder name to your program.

    kaymaf

    If that what you want, take it. If not, ignored it and no complain

    CODE CONVERTER SITE : http://www.carlosag.net/Tools/CodeTranslator/.

    Monday, February 15, 2010 7:49 PM
  • The user is asking for a shell addin....

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Tuesday, February 23, 2010 12:28 AM