Context Menu when right click exe - c#

When Outlook is pinned to your taskbar and it is not running, if you right click on it you will see option to create a new email, new appointment, etc. I'd like to add options like this to my C# console application. So that when certain options are selected it will do different things. I thought it was called context menu but I am not sure. All I can find is how to add context menus to the form and not the exe itself. Could someone point me in the right direction?

Related

Alter context menu for highlighted text in Windows10/11 [duplicate]

I'm trying to add a Windows Shell shortcut (right click context menu item) so anywhere in Windows, when I have text selected this item will appear. I cannot find the Registry item to alter/add or what to put there to get this to occur.
The selected text needs to also be passed to my application as an argument some how. I will be selecting some ID numbers, then manipulating those in the project.
Any assistance is greatly appreciated.
As far as I know, there is no way to create the shell extension which will allow you to inject into the any textbox's context menu.
The most you can do is to hook up the window creating API, filter out everything except context menu creation (WPF windows go down) and then do whatever you want to.

WinAppDriver: Right click on a tab.(C#)

There are few tabs in my application (Desktop Application). Able to identify the tab and Select it successfully.
Looking for optimal way to right click on tab, so that I can have access to context menu options.
NOTE: Shift+F10 is not working.
This was solved by using the Action class
Actions CtRightClick = new Actions(session);
CtRightClick.ContextClick().Perform();

How to include windows right click menu in my application?

I have a desktop app which after taking input from the user displays a list of files and folder(using a ListBox).
I want that when the user right clicks on any item in the ListBox, the right click menu of windows explorer should display.
I know I will have to use P/Invoke for this, but I am unable to find any relevant information such as which dll I have to use or which function I have to call.
Can anybody help me with that?
So this question is very old but has no accepted answer. I dont think Visionstar understood the issue OP is having.
My understanding is that you have an application running, and you would like to add an option in the WINDOWS EXPLORER's right-click menu. Not in your own application's context menu.
I do not think you can achieve this within your own application, however, what you can do is add an item in the Windows explorer's context menu (nothing to do with your application, you can just do that in windows; see link below) that you can setup to call a little script you would make (literally a little batch file... but could be a .net app too). That little script can take care of warning you main application. By creating a text file, or json file in a hot folder, or some other mechanism you would have to come up with.
Adding an item in the windows' contextual menu:
How add context menu item to Windows Explorer for folders
If you need to deploy this to other PCs, you can make a add_menu.reg file to make it simpler. I'll let you Google that one, but I think it's as simpe as a right-click -> export key in your regedit.
You will need to code it yourself, there is no embedded way simply add a OS-Contextmenu to it,because you have programmed the listbox, so you have to append some contextmenu to the listitem-rightclicks
Here are examples/guidance for adding a context menu:
http://msdn.microsoft.com/en-us/library/aa984254%28v=vs.71%29.aspx
http://social.msdn.microsoft.com/Forums/windows/en-US/790cd8be-0ba8-4f10-95a8-c88f1023d6e7/how-can-i-create-a-rightclick-menu-i-c?forum=winforms

How to detect the context menu opening over a WebView (Windows Store App)

I am trying to detect a long press/right click that opens the context menu over a WebView. I tried detecting a right click by using JavaScript (WebView.InvokeScript) however by capturing this right click it would also capture the right click to open the app bar.
I also took a look at customizing the context menu for a web view but it seems that this is not possible.
Is there a way detect a context menu opening up when the user is interacting with a WebView? Any help is appreciated, thanks!

Extend Visual studio Solution Right Click menu with new button

I want to add a new button to the menu when you right click on a solution. I want to add a button to to custom things with TFS and building and would like for it to be available when you right click on a solution. Currently there are several buttons for building cleaning etc. I am able to get a button onto the solution explorer toolbar (Circled in red) but would like to have it appear in the other menu (in the red square) Any help would be appreciated.
I followed this tutorial to get to where I am at now. Thanks
I can tell you how to add commands to that context menu: under the Tools menu -> Customize, in the Commands tab, click "Context menu:", find "Project and Solution Context Menus | Solution" in the extremely long and unwieldy dropdown, then hit Add Command... and add the command you want in that menu.
I've only used that information to add a macro (to replace the native "Open Containing Folder" command with one that used a different file manager), I've never tried to create my own command that wasn't a macro, but I expect if you were able to get custom Commands in custom buttons, you might also be able to find them in the Add Command dialog as well?

Categories