I have a window control that I show on my app. Sometimes, the window is closed by the user (clicking on the \'X\' button) and sometimes automatically by code.
I\'m list
Why not create a boolean value and then set it if the certain activity occurs?
bool closedByUser = false;
and then where the code is meant to close the form just add closedByUser = false; and closedByUser = true; if the action is user derived.
closedByUser = false;
closedByUser = true;