Is there a way to log all of the clicks in a Win Forms application? I’d like to intercept clicks and record the action and the name of the control that caused it.
Is this possible?
Thanks in advance.
UPDATE: I’m looking for an application wide solution, is there no way to add a listener to the windows event queue (or what ever it is called)?
You can do this by having your app’s main form implement the IMessageFilter interface. You can screen the Window messages it gets and look for clicks. For example:
Note that this logs all clicks in any window of your app.