Sherjeel Shabih
Sherjeel Shabih

Reputation:

How to get text clicked from another program into your own textbox?

What I mean is how can I get text from another running active window. For example I have a program let's say word or msn. I am chatting with someone while my own program is running in the tray. I want to set a key let's say right click and ctrl to open up my program and get the word I clicked on. I am using C#.

Upvotes: 0

Views: 503

Answers (2)

bytebender
bytebender

Reputation: 7491

you could copy the word and then get the word out of the clip board in your application... otherwise your talking API's for any application you might was to get a word from.

Upvotes: 1

Gavin Miller
Gavin Miller

Reputation: 43815

I direct you to my answer to the question Unified way to scrape HTML from any type of browser process

The answer links to an article on Coding the Wheel which details how to access text in other windows via system dll hooks. That should have what you require.

Upvotes: 1

Related Questions