How to get the highlighted text on any windows applications (word, sharepoint portal, web browser)
<p>I am developing an c# application.</p>

<p>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.,).</p>

<p>How to do this with C#?</p>

<p>I will really appreciate if someone comes up with a small sample instead of suggesting the links.</p>

<p>Thanks in Advance !</p>

<p>Let me explain it again in detail</p>

<p>I have to create a search application in c#. </p>

<p>Suppose if i select a text "vimal" in internet explorer (or word or excel or any application) and open the Search application then word "vimal" should be displayed in the search application.</p>

<p>Hope the requirement is clear now.</p>
