How to check whether the form has any ShowDialog() forms open?
- by kornelijepetak
I have a form MainForm with several properties/methods that are accessed from another thread.
At some point I might open a form AuxForm with ShowDialog() and then while that modal form is open, the other thread still modifies the MainForm's properties.
This is all desired.
In one of the methods accessed from another thread I need to execute some code, but only if the modal AuxForm is not open. Is there any way to check this (by using .NET WF Form properties) or I need to use a flag variable?
NOTE: None of these properties/methods modify the controls (so no Invoke is required).