How can I get my windows form to do something when it is closed.
Add an Event Handler to the FormClosed event for your Form.
public class Form1 { public Form1() { this.FormClosed += MyClosedHandler; } protected void MyClosedHandler(object sender, EventArgs e) { // Handle the Event here. } }