简体   繁体   中英

C# Integration into Windows Shell

I am currently in the process of developing an application in C#. I am using WPF forms and using an embedded SQLite Database.

I was wondering if it was possible to integrate my program into the windows shell. What I want to be able to do is if a user right clicks on a username or password text field on a website or a piece of software then the right click menu will show options for my program. If the user wants to copy their username from the software I have written then can right click on the field, go to menu 'Retrieve Password Manager Data' > choose the category (software/website) > company names retrieved from the database and then go to copy username or password.

Thanks for your help in this matter.

Integrating a .NET app into the shell without trouble is technically possible since .NET 4.0. Google IContextMenu to find sample C# code that implements the required COM interface. Beware of the difficulty of getting it right, debugging is very unpleasant.

But that's a long way from what you are asking for, the shell extension handler lets you create a menu entry in the context menu for Explorer windows. Text boxes in other apps don't expose a standard extensibility interface like the shell does. It is not quite impossible, it requires injecting code into the app with a windows hook. But you can't write that kind of code in C#.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM