Solved

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

Posted on 2004-09-01
2
169 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

Independent Software Vendors: 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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

632 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