Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-09-01
2
Medium Priority
?
170 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 500 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

730 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