How to log user actions in a winforms application

I would like to log user actions in winforms applications. "User actions" means "click on a menu item / button", "move / maximize / collapse / close a form", "keydown / up", etc.

The log should contain time, action type (click / keydown / etc ...), target (control name / text).

I have access to the source code of the target application, but I would not want to override methods such as "OnClick" or "OnKeyDown" in every winforms control I use unless needed.

Is there some neat solution how to do this?

Thanks!

+1


a source to share


1 answer


You can use attributes, but I'm wondering if the benefits will outweigh the cost?

See this link for an example of creating an attribute that can be set for each method



http://www.yoda.arachsys.com/csharp/benchmark.html

+1


a source







All Articles