473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Create a custom listing in all applications context menu

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
2 2316
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Roman Muntyanu | last post by:
Hi all, I wrote add-in that can do different job for files with different extension. When I do right click on the file I see all my custom menuItems in context menu of solution explorer for all...
8
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for...
1
by: Fritz Switzer | last post by:
I have a two part question. I would like to provide a run-time feature that would duplicate the design-time capability to create a Context Menu. This would be where the user could create their...
1
by: genojoe | last post by:
I have a VB.NET application with two forms that contain a RichTextBox. I have created a context menu for one of the RTF controls. I want the same context menu to work for both. The no-brainer...
5
WebDunce
by: WebDunce | last post by:
hey all, i'm building a custom control. it contains a treeview and a context menu. each tree node's context menu property is set to the control's context menu. it works good...except... if...
7
by: Marcolino | last post by:
Hi all, I need to add a custom button to title bar on a form in addition of a standard button. (Minimize/Maximize, close etc.) I need also to handle OnClick event of this button. I looked around...
3
by: misaw | last post by:
i know its not good practice but a client requirement... in our web application we want to prevent back and refresh functionality ... we use custom window without any menu, address bar links etc......
9
by: Academia | last post by:
ContextMenu has a Popup event but MainMenu does not. I need Popup with MainMenu. Do you know anyway to simulate it? Thanks in advance
1
by: fivanec | last post by:
Hi everyone, I need to create in Pocket Outlook custom menu item using C# or VB.NET for Windows Mobile 5.0 and then subscribe on the event of that custom menu item to invoke my Windows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.