开发者

How to call some method when user ends highlighting text inside another application?

I want to call some method when user ends selecting/highlightin开发者_如何学Gog text inside another application:

OnUserEndsSelectionTextInAnotherApp(string selectedText)
{
    MessageBox.Show(selectedText);
}

Is there any similar method to OnUserEndsSelectionTextInAnotherApp in real world? The second application is completely different process, like web browser, text editor or pdf reader.

Thanks.


If the other app is coded by your own, you can use messages to communicate between your applications.

Here is a sample: http://social.msdn.microsoft.com/Forums/en/winforms/thread/ccee7ae6-75ca-4916-89cf-a099d12074a7


You will need to setup some sort of messaging layer between the two, is the second application in the same process (but another app domain) or is it completely different process ?

you could use .NET Remoting to signal messages between applications.

This is good article about .NET Remoting which helped me in th past

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜