I call a class form MyForm
. In my class I have if-else
statements. I want to close all processes. I need a command that looks like
element.close();
Example, my code:
if (_condition a_)
{
//operations class;
}
if(_condition b_)
{
//abort all, and close all;
}
How should I do if I am not in form? I would close all cycle by code from my class.
You can start your form with the FormRun class and close it again with formRun.close(). Remember to call formRun.wait() when you want the form to remain open and wait for an action from the user.