How to get the highlighted text on any windows applications (word, sharepoint portal, web browser)
I am developing an c# application.
Whenever my window gets activated, I want to get the highlighted/selected text on any windows applications (like word, excel, sharepoint portal, web browser, etc.,).
How to do this with C#?
I will really appreciate if someone comes up with a small sample instead of suggesting the links.
Thanks in Advance !
Let me explain it again in detail
I have to create a search application in c#.
Suppose if i select a text "vimal" in internet explorer (o开发者_C百科r word or excel or any application) and open the Search application then word "vimal" should be displayed in the search application.
Hope the requirement is clear now.
This is impossible for any application. Every application handles text differently.
They may have multiple (rich or not) text boxes that keep the text selected, etc.
Some other applications might use custom controls with custom selection logic...
This is impossible. Correct me if I am wrong (but it won't be the case).
Edit: Read the second answer in your own link.
精彩评论