Monitoring activation of some window

How can I catch messages in my program activation or deactivation of some other program(window) ?
roupikAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

seredaCommented:
To catch messages that go through your application's (main thread's) message queue, you can use
  Application. OnMessage
event.

To catch all other events, i beleive you should use a very sophisticated technique which i don't think you need in fact.
0
roupikAuthor Commented:
Event generate some other window (other application). And this event I want to catch in another (my application). onMessage doesn't work to me :o(
0
edeyCommented:
roupik,
This would require subclassing the other app's window (which requires injecting a .dll into that app's address space) which is highly undesirable.  Perhaps you could explain, in a little more detail, what it is you need to do as there may be a better solution

GL
Mike


Sereda, did you read the question? Did you consider giving a comment before an irrelevant answer?
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

seredaCommented:
Well, then it's not that simple question (for me, at least) ;)
0
seredaCommented:
Okay, edey, i admit my mistake -
I am sorry, roupik.
I am quite new here, and i didn't find any reasonable instructions distinguishing comments and answers.
Also i just didn't think that a complicated question involving dll injection would cost 25 pt.
Again, i apologise.
0
pbibergalCommented:
You should hook the system messages..
because this is really hard work i suggest you to get allready working component that will notify you about it.. it is called Twatch, you can download it from www.bome.com
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
edeyCommented:
hey... To err is human, to do so twice is to invite an ass whoopin' :).  I hope you'll be able to find ee as helpfull (& interesting) as man of us do :)

GL
Mike
0
roupikAuthor Commented:
Hi, all guys - stop every irrelevant sentences :o) I'm in for about one hour and got many answers for my (sometimes) not easy Q - sorry for 25 pts, I don't know it is not easy to track ... stay tuned, more q is comming
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.