Solved

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

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now