Create a custom listing in all applications context menu

J

Jay Douglas

Hi community,

I would like to add a new custom menu item to the right click context menu's
in notepad and the cmd shell. The same context menu that displays edit,
paste, etc. Example, someone highlights a name, right clicks on it and
selected an option to "Search Database" and my C# code executes.

Is there a means to my end? I'm having a hard time finding any resources.

Thanks,
Jay
 
T

thomasnguyencom

Hi community,

I would like to add a new custom menu item to the right click context menu's
in notepad and the cmd shell.  The same context menu that displays edit,
paste, etc.  Example, someone highlights a name, right clicks on it and
selected an option to "Search Database" and my C# code executes.

Is there a means to my end?  I'm having a hard time finding any resources.

Thanks,
Jay

I'm not sure you can add a context menu item to notepad or any other
application.

You might be better off creating a shortcut key that executes your
"Search Database" with the contents in the clipboard (after you do a
right-click, copy in notepad).

Good luck,
-tom
 
M

Michael B. Trausch

I would like to add a new custom menu item to the right click context
menu's in notepad and the cmd shell. The same context menu that
displays edit, paste, etc. Example, someone highlights a name, right
clicks on it and selected an option to "Search Database" and my C#
code executes.

Is there a means to my end? I'm having a hard time finding any
resources.

You may be able to create a "hook" into the Win32 API. I am not sure
if you can do this _fully_ from managed code or not. Here is a
starting point for your research, though:

http://www.codeguru.com/cpp/w-p/system/misc/article.php/c5667

--- Mike
 
J

Jay Douglas

Thanks for your help guys, this one has "Outsource Me" written all over it.
I'm sure a C++ developer will have a much easier time getting the system
wide hooks going.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top