Q:

Handle closing event for dynamically created form

I have a program up and running that can read in data from a piece of hardware. My program has the ability to graph these incoming values at rates specified by the user. (Using a zedgraph control). When the user chooses to graph the values, a new form is dynamically created that contains the graph.
In practice, a user can have as many graphs as they want. My problem is I need to create an event handler for when those dynamically created forms (containing the graphs) are closed. I know for my main UI I can just use the designer tool and click the closed event to make a handler. However I'm not sure how to do this for a dynamically created form. 
Any advice is appreciated!

A:

The designer isn't doing anything fancy.  You can see what it's doing in the .Designer.cs file.  Here's how you do it yourself:
myDynamicForm.FormClosing += new FormClosingEventHandler(your_handler_method);

