Hii!!

i have small console program that do somting
and i want to add it to system content menu bar.

for example if you are mark
(could be at notepad, change file/folder name,explorer, etc)
text and click rigth on the mouse
you can copy cut or past

i want to add my small program to this menu bar,

did i need to add registry key?
or mybe add the program to special folder?

eyal

Recommended Answers

All 8 Replies

>>for example if you are mark
I'm not an English speaking person myself, so I have great problems in understanding what you mean by the word mark :icon_eek:

u can use c#?

Thank's posting me,

I mean to get click left menu strip when you mark some text.
like if you want to change file/folder name you can mark the name
and copy cut past ...
(like the screenshot)
and add my program.

eyal c

Im not sure how to add the menu item, but to help make things clearer, by 'mark' you mean 'highlight' :)

And the menu you are trying to add to is the context menu :)

So you want to add an item to the context menu when right clicking on highlighted text.

Concise terms will always help you get to the right answer quickly :)

Hope you get what you need

Thank's for your help.

Sorry if wasn't clear enough, English is not my first language.

I have another solution of this ----->
highlight text and then press shortcut key
(for example -> ctrl + alt + w)

And run it like it run in "cmd" -> XXX.exe abcdefg
(highlight text --> 'abcdefg')

thank's and Sorry again

eyal

You have to create a global system hook to capture the window's WM_CONTEXTMENU message and override the default context menu across all applications. Take a look at this thread, which is same conversation about modifying the default system context menu for text editing: custom system context menu. Many people will say you can't do it, but I am betting it can be done. It's not a common thing to do and there is no support for doing this. There is no easy answer.

If you decide to pursue this, you will want to include "global system hook" in your searches. Here is a link to some codeproject examples: Global System Hooks. I did not browse these links and it is possible that one of them might mention your exact request, but I doubt it. Anyway, I hope this steers you in the right direction...

Cheers!

I am still not sure, your screenshot shows widows explorer while editing the name of a folder, if you wish to pass the name of a rightclicked folder to a program you don't need it when editing text.

you can modify the registry's HKEY_CLASSES_ROOT. it has a key named FOLDER you can add a command to that easily that will make rightclicking on a folder give you the ability to open your program passing to it that folder.

here is a codeproject example:

http://www.codeproject.com/KB/cs/appendmenu.aspx

otherwise it is unclear of your goals. I hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.