WinForms Event Tracer

One of the problems facing a WinForms developer is choosing which event handler to pick when he wants to handle a certain event. Now this sounds easy, you might say: I want to do something when the user click on the form so I add an event handler to the form Click event. And in this case that works just fine but suppose you want to do something when a user tabs from one TextBox to the next. In this case a number of events are raised.

 

To help the developer pick the right event I have started developing an event tracer utility. This utility gives the developer insight into which events are raised and in what order. This way a developer can see that the Validating event is raised when tabbing between controls. But equally important the developer can spot an event that isn’t raised. For example he might set the CausesValidation property to false and the Validating event is no longer raised. Now he watch the trace, confirm the event is no longer raised and pick another suitable event instead.

 

Note: This version of the EventTracer is still an early 0.5 beta version so it isn’t exactly finished yet :-)

 

You an download a beta version of the Event Tracer from: http://www.theproblemsolver.nl/dotnet_file_0003.htm

 

Enjoy!

 

Maurice de Beijer

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>