By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,619 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,619 IT Pros & Developers. It's quick & easy.

Create a custom listing in all applications context menu

P: n/a
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
Nov 12 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Nov 12, 9:26*am, "Jay Douglas" <j...@jaydouglas.REMOVEIFNOTSPAMcom>
wrote:
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
Nov 12 '08 #2

P: n/a
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.

"Michael B. Trausch" <mi**@trausch.uswrote in message
news:20081112105811.6ad976d0@zest...
On Wed, 12 Nov 2008 08:26:06 -0700
"Jay Douglas" <ja*@jaydouglas.REMOVEIFNOTSPAMcomwrote:
>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/syst...icle.php/c5667

--- Mike

--
My sigfile ran away and is on hiatus.
http://www.trausch.us/
Nov 12 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.