reverse engineering event behaviors, StackTrace
The exact sequence and circumstance of raising events is rarely obvious from the documentation of an object. Here are some tricks for quickly adding instrumentation code to your project prior to experimentally exercising the component.
An easy way to track the events being raised:
1. In the designer, double click each event of interest in the Properties->Events view.
2. In the code view, enter the line below in each event handler:
Debug.WriteLine((new StackTrace()).GetFrame(0).GetMethod().Name);