I would like to know how I can add a counter to a button click event, for example, I would like to make it so that when you press the Save button it adds 1 to the counter. When the user presses Exit without saving anything I would like it to open my Save Changes form, I would need the count so I can put something along the lines of:
if(count ==0)
{
frmExit search = new frmExit();
search.ShowDialog();
}
boolat the form levelIsSaved = falsethen set this to true in the button click.. so pop up if its still false when exiting ! !