-
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.
-
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.
-
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
-
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,
-
Re: Windows Right click
-
Re: Windows Right click
Try:
HKEY_CLASS_ROOT\Shell\<Your Key Name>\Command
(Default) REG_SZ <YourProgram Name> %1
-
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
-
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. :p