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

Detecting foreign window messages

P: n/a
Hello

How can I write a C# Windows Forms application so that it tells if it
receives foreign windows messages.

Foreign, say something like when another application takes its HWND and
issues a WM_APP+123 for example.

--
Elias
Aug 9 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Elias,

Well, you have to have a definition of what is foreign. Once you have
that, you can implement the IMessageFilter interface and then in the
PreFilterMessage, act on windows messages that are foreign to your app.

You would then pass this implementation to the AddMessageFilter method
on the Application class.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"news.microsoft.com" <la*****@lgwm.orgwrote in message
news:Op**************@TK2MSFTNGP02.phx.gbl...
Hello

How can I write a C# Windows Forms application so that it tells if it
receives foreign windows messages.

Foreign, say something like when another application takes its HWND and
issues a WM_APP+123 for example.

--
Elias

Aug 9 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.