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();
}
Are you dealing with text? Do you edit more than once? Because you have to change its value to false again whenever edited !
If not this code will work just fine!