I've been looking throw all the example and I can't get them to work! I've a form that contains information on closing of the form I want to be able to automatically save the information if the user has not saved it already. it appears that the event is not firing. Do I need to place anything int he Form1.Designer.cs file? Here is my code: (I am using C# .Net 2 with VS 2005)
private void Form1_Closing(object sender, System.ComponentModel.Canc
elEventArg
s e)
{
if (!itemSaved)
{
e.Cancel = true;
SavedData();
}
}
Start Free Trial