By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,493 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,493 IT Pros & Developers. It's quick & easy.

Intercept messages belonging to a foreign app?

P: n/a
Let's say I want to watch a RichEdit control (e.g. a chat window)
outside of my own C# application and intercept its Windows messages.

Is there a way to do this?

Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi,

i think that will be only possible by using
unmanaged code. There is a posting about
hooking global key events within your application
which should be smilar to that what you want
to do.

http://groups.google.de/group/micros...3edbe9e0451e0f

But why you have to do that? I think
a chat client should work with protocols
and ports to recieve it messages.

Cheers
Lars Behrmann

_________________
Nothing is impossible. UML is the key for all your problems.
AODL - Make your .net apps OpenOffice ready
http://aodl.sourceforge.net/

Zo****@gmail.com schrieb:
Let's say I want to watch a RichEdit control (e.g. a chat window)
outside of my own C# application and intercept its Windows messages.

Is there a way to do this?


Nov 17 '05 #2

P: n/a
Thanks Lars for responding. This is actually a chat window within a
game, and I'm trying to see if I can grab text from that control as it
gets posted there. To do this I'm wondering if I can create an event
handler which watches that control (which is outside my own app) and
respond to changes which would indicate that new text has appeared.

Nov 17 '05 #3

P: n/a
Salam

i think you have to work with Win32 Programming and Check for the System
Events thats are occuring. I worked on a Application (Windows Service) that
uses to monitor the activity of the browser like Browser Open, Closed, Link
Asked etc, the main approach i used to loop through the process in the
Windows Shell, and then add a event to that process, in this way i capture
the required events raised by/on the browser.
--
ALI RAZA SHAIKH
MCAD.net

www.programmersparadise.cjb.net
alirazashaikh.blogspot.com
<Zo****@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Let's say I want to watch a RichEdit control (e.g. a chat window)
outside of my own C# application and intercept its Windows messages.

Is there a way to do this?

Nov 17 '05 #4

P: n/a
Find out which port the game uses; this is usually listed in a manual or something.

Then, write a program that taps into that port and gets the messages from it:
1. Connect to "network" on port number
2. Convert incoming bytes to string
3. Display string

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.