开发者

Right click, text capture

开发者 https://www.devze.com 2023-02-06 12:24 出处:网络
I have a c# application that runs in the bottom right corner of t开发者_C百科he page, i was wondering how i could go about making my application appear when the user selects some text anywhere (say a

I have a c# application that runs in the bottom right corner of t开发者_C百科he page, i was wondering how i could go about making my application appear when the user selects some text anywhere (say a pdf, browser etc) and then right clicks, goes to my custome selection bit say and it pastes that text in to my running application.

If anyone made any sense of that could you advise me in to what i need to be researching to get it done.

Thanks


I've got this dictionary which does something similar.

Here's its mode of operation (or at least what I think it does)
When there is a double click, it sends a key command (probably Ctrl+C) to copy the selected text. It then reads the text from the clipboard.

For your purpose, you could implement the mouse listening and sending keystrokes with this article I found on CodeProject: InputManager library.

You then retrieve the copied text from the clipboard and do whatever you want with it.


Have a look at a Clipboard monitor


You can hook into the windows messaging api, probably there is a Text-selected event.

0

精彩评论

暂无评论...
验证码 换一张
取 消