I have a form which I’m setting to disabled via this.Enabled = false on Form_Load if a certain condition is true.
However, this also disables the control box (maximise box, minimize box, and close box).
So when the form is disabled, i have no way of closing it since the close box is disabled as well.
Is there away I can disable the form but leave the close box enabled, so that I can be able to close the disabled form?
This forms’ OnClose event also exits the application.
You can build a small method that would be called if the condition is true and disable all controls/containers available in this Form.
Pseudocode:
edit
This method don’t take effect on the controlbox.