I want to make an application to intercept all UI events in all the forms of my application and to write them to a log. This data can than be used to see which controls are
You can install a message filter.
A message filter is an object that implements IMessageFilter
. WinForms calls your PreFilterMessage
method for every message that passes through your thread's message loop. This is enough to monitor user input across the application (and gives you the option of manipulating it).