Solved

Is there a class in Framework which u can use to capture all Windows events?

Posted on 2004-09-01
2
168 Views
Last Modified: 2008-03-06
Is there a class in Framework which u can use to capture all Windows events?
0
Comment
Question by:MargusLehiste
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
imu79 earned 125 total points
ID: 11958110
Most events in windows are in the form of messages. you can use the IMessageFilter interface to capture all messages. Here's an example of how you can use the IMessageFilter interface:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsapplicationclassaddmessagefiltertopic.asp

note that the method IMessageFilter.PreFilterMessage filters the messages as soon as they leave the message queue and before they are sent to the destination control.

hope this helps..
Imran.
0
 
LVL 3

Expert Comment

by:imu79
ID: 11958161
You can also use the NativeWindow class to process all messages. here's an article that will get you going on how to use this class to process window messages:

http://www.vbaccelerator.com/home/NET/Code/Libraries/Windows_Messages/Subclassing_in__NET/article.asp

The difference here is that in this the messages are intercepted only after they've been dispatched to the appropriate window.


Also take a look at this article which I think might help:

http://www.sys-con.com/dotnet/article.cfm?id=482


hope this helps..
Imran.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question