Page 1 of 2 12 LastLast
Results 1 to 40 of 46

Thread: right click on windows. [hard]

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    right click on windows. [hard]

    I have found the following source code

    I have registered the registries (by double clicking them), but I cant find the DLL that it wants me to register.

    Heres the ZIP file.

    Can anyone please help me out.
    Attached Files Attached Files

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: right click on windows. [hard]

    Without unzipping the file (but reading the vbp file from inside of WinZip) I can tell you that there are no DLL's. However it contains two different type libraries (*.tlb) that you'll need to register. Extract them to your System32 folder and in the Start > Run dialog box type:
    RegSvr32.exe IctxMenu.tlb
    and
    RegSvr32.exe IDataObj.tlb

    After that you can open the project and compile it to an ActiveX DLL file (VB will automatically register that for you when you compile it). Now if you have added the registry entries by running the *.REG file you should be all set.

  3. #3
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: right click on windows. [hard]

    So you missing the DLL? I bet if you put the DLL name into google you will find a download of it
    Chris

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Quote Originally Posted by Joacim Andersson
    Without unzipping the file (but reading the vbp file from inside of WinZip) I can tell you that there are no DLL's. However it contains two different type libraries (*.tlb) that you'll need to register. Extract them to your System32 folder and in the Start > Run dialog box type:
    RegSvr32.exe IctxMenu.tlb
    and
    RegSvr32.exe IDataObj.tlb

    After that you can open the project and compile it to an ActiveX DLL file (VB will automatically register that for you when you compile it). Now if you have added the registry entries by running the *.REG file you should be all set.
    Thankyou.

    I Love these forums.

    also, just a quick question. Do I need to compile it to run it?

    ALSO..

    sorry i am a ameteur but my friend really needs this, (and I owe him basically haha),
    but I have a procedure that uploads the file.

    How would I change the "links" or the "procedures" that come up when you right click?

  5. #5
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: right click on windows. [hard]

    I guess you are geting the warning 'cause 'binary compatibility' is set in the project properties. Recompile the dll and it should work.

    BTW, for more info on context menu see these pages:
    Context Menu Handlers and Edanmo's Shell Extensions example

    Edit: Oops ! I'm late again.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    No, when i copied them to my system 32, and i ran the commands,

    i get the following error:

    " *.tlb is not an executable file and no registration helper is registred for this file type."


    and iPrank, your never to late to help anyone. I apprecaite your help and everyone else who helped me.

  7. #7
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: right click on windows. [hard]

    VB6 should register them autometically as they are in the same folder. No problem here.

    I thought you were talking 'bout the 'incompatibility' warning.
    Are you using older VB ?
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    I am using VB 6.

    when i open the project I file. .

    i get the
    "unable to set the version compatible component: " and it gives me the file path to the dll file. (the file path is right, but the folder has no dll)

    when I am typing the command in, do I need to put in the whole file path?
    Last edited by masfenix; Feb 18th, 2006 at 12:38 PM.

  9. #9
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: right click on windows. [hard]

    Did you compiled the dll and replaced the old CLSID with the new one in the reg files ?
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Ok,

    This is what i did.
    I clicked the reg files, and entred them in.

    then I did copied the tlb files to system 32
    and ran
    RegSvr32.exe IctxMenu.tlb
    and
    RegSvr32.exe IDataObj.tlb

    but I got the error where it says
    " *.tlb is not an executable file and no registration helper is registred for this file type."
    I tried opening the project and I get an error :

    Re: right click on windows. [hard]

    --------------------------------------------------------------------------------

    I am using VB 6.

    when i open the project I file. .

    i get the
    "unable to set the version compatible component: " and it gives me the file path to the dll file. (the file path is right, but the folder has no dll)

  11. #11
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: right click on windows. [hard]

    Ignore that error! Compile the DLL and edit the REG file so it has the correct CLSID.

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Sorry.

    But how can I compile it when VB dosnt open it?

    or does it open it? but since theres no form, it wont show a form?

    also whats CLSID?
    Any tutorial on that? (I will also do a search on that0

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Ok, so i opened it in VB, and then I went to "file" and I saw,

    "make contextmenu.dll"

    and i made it into system 32 folder.

    so now what about CLDIS?

    This is what I found in the "module" comments:
    ' to get the GUID compile the dll and then do a registry search for ContextMenu.cMenu.
    'The registry entry you find will have the clsid, this is the number you want.
    ' Place this number in the registry file ContextMenu.reg located with this project.
    'To test after you compile and after you reg it and after you place correct registry entires
    'then right click on a file. To test you changes, you will have to close all instances of the explorer
    'before you can recompile, if you have VERSION COMPATIBILITY set to Binary COMPATIBILITY then you can just
    'open explorer again and right click the file.
    now how do i do a registry search?

    guyz.. you dont even know how much I apprecaite this.

    Also, this is the reg file:
    REGEDIT4

    ; ------ FOR YOUR OWN DLL'S -------------------------------------------------------------
    ; Replace {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} with a valid Classid entry for your dll.
    ; Also replace the * with the correct place you want it in, and the name of the
    ; context handler. Usually this stuff is done in a setup program, or by the exe itself.
    ; ---------------------------------------------------------------------------------------
    [HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\VBContext]
    @="{4A657346-4C64-439B-8A09-E13CE0F7114F}"

    ; This line makes it so that your DLL is registered for Windows NT.
    ; Again, change around to your details
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
    "{4A657346-4C64-439B-8A09-E13CE0F7114F}"="VB Context Menu"
    Last edited by masfenix; Feb 18th, 2006 at 12:56 PM.

  14. #14
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: right click on windows. [hard]

    Start RegEdit, click Edit > Find and search for ContextMenu.cMenu and you'll see a number looking simular to this: {83E6B0B6-6AE5-449B-8287-8F26E0254F7D} (but with another number). You'll have to replace the number in the REG file with the one you'll find.

  15. #15
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  16. #16

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Should I leave the

    "[HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\VBContext]"

    alone?

    Yes I found my new key, but should I leave the path or w/e alone?


    also how would I go about compiling it?

    Its not in "File" menu anymore.

  17. #17
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: right click on windows. [hard]

    If you haven't changed the project's name, then there is no need to change anything else.

    Just replace the CLSID and run the reg file.

    Edit: Also replace the * with the original reg key.
    Last edited by iPrank; Feb 18th, 2006 at 01:13 PM.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  18. #18

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Thankyou iPrank, but how should i go about compiling it?

  19. #19
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: right click on windows. [hard]

    I thought you already had compiled it... Otherwise it would be impossible for you to see the CLSID in the registry since it is created when you compile the DLL.

  20. #20

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    ok my steps:

    I copied the two tlb files to system 32.
    then i ran the two codes from my run dialog. that gave me error
    then i opened VB 6 and it gave me error. I ignored it.
    I went to "file" menu and saw a "make context menu.dll".
    I clicked that and put it in system 32.
    I went to regedit.
    I found the new code.
    I opened up the two registry files in notepad. Editied the old key with new one.
    I double clicked them so it enters it.

    so.. now what? I press F5 to run it, but it dosnt show my menu.

  21. #21
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: right click on windows. [hard]

    The step where you clicked File and "Make context menu.dll" is where you compiled it... That what it means, you'll compiling the code into a DLL (or EXE, or OCX depening on what type of project there is).

  22. #22
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: right click on windows. [hard]

    It is a Shell Context Menu.

    Right click on some files in explorer and see if anything new in in the context menu.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  23. #23

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Nope. I checked that, thats why I thought I was doing something wrong.

  24. #24
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: right click on windows. [hard]

    When you right click on a file in Windows Explorer a new menu item named My NIFTY little Extension Chad should appear (if this code works as it should and you've made the correct changes in the REG file before double clicking it).

  25. #25
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: right click on windows. [hard]

    Read the sample chapter I linked in Post#5. At the bottom of that page read 'Registration and Operation' topic. Make sure you aren't doing anything wrong when registering.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  26. #26

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Well it dosnt. so I am going to repeat the steps over.

    Also, are my steps right though? is that the order?

    and will it come automattically or do I need to run the code using F5 or Control F5.

  27. #27
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: right click on windows. [hard]

    Do NOT compile the project again unless you have set the Project Compatibility option. Otherwise you'll change the GUID (aka. CLSID) in the registry, and you don't want to do that. You don't have to run the project from VB. The system will (or should) call the code in your compiled DLL when you right click on any file that you have registered to be used with this context menu handler.

  28. #28

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Ok.

    THANKYOU.

    I made the DLL again, got a new key, and changed them in reg. then I entered the reg again.

    and now IT WORKS.


    I REALLY APPRECIATE IT>!!!!!!

    so now i have to work on what will happen when I click the proc.

    do I have to change that in VB? or what?

  29. #29
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: right click on windows. [hard]

    Yeah... that context menu doesn't do much but shows a MsgBox from the look of it . If you want to do something else you'll need to change the code in the IGotClicked1 Sub at the bottom of the cMenu class. However changing the code means that you'll need to recompile it, so before you do that follow these steps.

    1. Copy the DLL that you created in your System32 folder to the folder where you'll have the source code (or to a subfolder).

    2. Inside VB click Project > ProjectName Properties and select the Component tab. Check the Binary Compatibility option at the bottom and Browse to the copy of your DLL file.

    3. The textbox should now show the path to the copy of your DLL, click OK to close the dialog box.

    4. Do the changes you want to do in the project. Save the Project and Compile it again (File > Make DLL) and replace the origional DLL file in the System32 folder.

    If you follow these steps you should not need to change anything in the Registry everything should work.

  30. #30

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Thankyou.

    If I am making a program for others to download and install, I would need to distribute the DLL right? And it will have to add the registry again right?

  31. #31
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: right click on windows. [hard]

    Yes... You should create a setup package that registers the DLL and that creates the Registry keys you want to use for the context menu... As long as you have the Binary Compatibility option set the GUID will not change even if the DLL is moved to another computer.

  32. #32
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: right click on windows. [hard]

    In that case, make a install package with a good installer. (like Installshield/InnoSetup).
    InstallShild has a option where you can add your reg file. It will take care of registration.
    In inno, i think you'l need to write the script manually.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  33. #33

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    What about the Package distribution that comes with VB?


    Also I did the Project -> make bianry, but now where do I save my new DLL?

    The system 32 or my folder with source code.

    i cant to system 32 because it says "permission denied".

    (probably because its being used?)

  34. #34
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: right click on windows. [hard]

    The P&D wizard is a very basic installer. It can't register your reg files.

    I guess you are getting "permission denied", because your previous dll is still loaded in memory.
    Wait a few minutes and/or unregister the previus dll with
    Regsvr32.exe /u dllname.dll
    then try again.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  35. #35

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    It still says that permission is denied .

    but i think its unloadded because the right click meny has disspared.

  36. #36

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Ok, well i saved the new DLL with my source code.

    and everything still works now.

    but i cant find the "menu" names and such. its not in the class file.. How would I go about changing that.
    accutally uhh I am soo confused.

    I saved the new DLL in my source code, but that didnt make the change i made.

    But I cant save to system 32 because permission is denied.

  37. #37

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Wow, I have done everything..

    its just that when i update the class file or something, I cant make a new DLL.

    it says permission denied.

    I tried unregistering it like iPrank siad, but still no luck

  38. #38
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: right click on windows. [hard]

    I've searched google and found some interesting info. I hope they will help you.

    Permission Denied error when compiling an ActiveX DLL - I hope it will solve your problem , VB dll/exe version compatibility , Dll permission denied , VB DLL Error 70 - Permission Denied in XP Pro
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  39. #39

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    HAha thanks.

    i googled my error too and i found that page, but I cant seem to get the steps.

    Here are all the steps to reproduce this:
    1. Create an ActiveX DLL.
    2. Add a standard EXE to the project group to test the DLL.
    3. Add a reference in the standard EXE to the DLL.
    4. Compile the DLL.
    5. Recompile the DLL. You will now get this error.

    *** 5a. Remove the DLL from the group. This resets the reference from the ActiveX DLL project to the DLL itself.

    6. Test again. Things should be fine.
    7. Re-add the DLL to the project group.
    8. Recompile the DLL. You will now get this error.

  40. #40

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: right click on windows. [hard]

    Ok, not worrying about the DLL right now. i have another question. Im just absolutely stumped on this.

    Ok, so I noteiced that there is no "form" with this script. But I need a form to upload.

    Well i dont really need it, but I have my components dragged on there.

    anyone know an FTP script with simple upload (just upload) to a web server?

    How can I put in a form, and use it from the class file.

Page 1 of 2 12 LastLast

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