Results 1 to 8 of 8

Thread: Windows Right click

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    Nashville, TN
    Posts
    114

    Windows Right click

    I'm down to the last section of my program and I need an "activator" to start it.

    What I need is a scrip to something that writes to the registry to enable my code to run from a right click selection. I want to be able to run the program no matter whether the user selects any file or folder.

    I have seen code listed here that adds a name (program name) to the right context menu for selected files, but nothing that would cover any file.

    Any help would be greatly appreciated.
    Mike

  2. #2
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: Windows Right click

    You could always use a global hotkey hook from Windows. I did that for my security program, works like a dream. Nobody knows it's even there unless they hit that hotkey, and that's when the program fires up. I can find the code for that if you'd like.

  3. #3
    Hyperactive Member
    Join Date
    Feb 2006
    Location
    Melbourne, Australia
    Posts
    415

    Re: Windows Right click

    I think he means he wants to add an option in the menu that pops up from right-clicking a file/folder which would run his program

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    Nashville, TN
    Posts
    114

    Re: Windows Right click

    Rob123 is correct. The program name would be a persistant in the context but I would have a check in the program if nothing is selected.

    The program name in the right click would need to be at the top of the list and present like "Copy" or "Delete" when a file or folder is selected.

    Thanks,
    Mike

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    Nashville, TN
    Posts
    114

    Re: Windows Right click

    Bump, Anyone?
    Mike

  6. #6
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    342

    Re: Windows Right click

    Try:

    HKEY_CLASS_ROOT\Shell\<Your Key Name>\Command
    (Default) REG_SZ <YourProgram Name> %1

  7. #7
    Lively Member
    Join Date
    Apr 2007
    Posts
    118

    Re: Windows Right click

    could u give some example of using hot key?
    coz the scenario is i have a runable program in my window.its vb compiled already as .exe. for example my .exe is in the desktop or anywherein the folder.when i clicked F12 the .exe file will run or open or be activated....

    any help pls? thanks

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

    Re: Windows Right click

    If you are looking for menus/submenus like WinZip/winRar, then you'll need to use Shell Extension.
    See these links for a sample chapter and code:
    http://www.oreilly.com/catalog/vbshe...pter/ch04.html
    http://www.mvps.org/emorcillo/en/code/vb6/index.shtml

    Edit:
    @natasha_arriell,
    Wrong thread.
    Last edited by iPrank; Apr 25th, 2007 at 10:09 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


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