private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if(e.CloseReason==CloseReason.UserClosing) { e.Cancel = true; /* if it is true then it can be seen that the statements inside the formclosing methods runs twice(which causes the problem) before going to formclosed. when i set it to false then the problem gets resolved and y is that so */ this.Hide(); UpdateToken(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)