1.WillControlBoxproperty is set toFalse。 This method is to let the title bar in addition to the title name of all other than the hidden, that is, the icon, minimize, maximize and close button all hidden.
2.Disable the Close button by finding it in the eventformcloseingEvent, edit the event, and write a statement in the "E.cancel = true;", so the Close button fails, press the shortcut key"ALT +Space+c"cannot be closed, only with the task manager turned off, or with a statement(“application.exit ();”)To close the generated application,WithAlt+f4"can also be closed.
3.WillFormboderstyleproperty is set toNone。 This method removes the entire title bar. This also uses the shortcut key "ALT +Space+c"cannot be closed, only with the task manager turned off, or with a statement(“application.exit ();”)To close the generated application,WithAlt+f4"can also be closed.
How to hide or invalidate a close button in C #