开发者

Right click, text capture

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜