Is it possible to close a form while the constructor is executing (or simply to stop it showing at this stage)?
I have the following code:
public par
If you want your window to never be seen
(no flickering windows that open for an instant and then disappear):
public new void Show()
{
if (MyFunc())
base.Show();
else
; // dispose or whatever
}
Though Show(...) has 2 overloads and ShowDialog(...) has 2 too.
Doesn't work for the main form that is opened via Application.Run(). But who would do that anyways? Except there is also a way to open main form without using Application.Run().