The usage of the Show. And ShowDialog methods in C # is different,
Show () is a non-modal form.
ShowDialog () is a mode form.
If Show is used at this time, it will happen that when the subform is opened and the main form is displayed again, the ShowDialog () when the child form is closed, the main form is displayed.
We can convert the show method to the showdialog method. As the name suggests, showdialog is a show method bound to a path. It cannot be switched freely, that is, if you do not close your current page, you cannot close any page next to the page. It is currently unique (opened by a channel) and is true.
Because the show method is not bound, the displayed windows and dialog boxes can be switched to each other without closing the current window and dialog box. However, the order of the window opened by the show method is not fixed because it is not bound. If there is any problem, the sequence of windows opened by the show method may be greatly changed!
The difference is that the form opened with showDialog () can be operated only after the form is closed, while show () is not subject to this restriction.
For example, you first open the subform and want to hide the main form.
If Show is used at this time, it will happen that when the subform is opened and the main form is displayed again, the ShowDialog () when the child form is closed, the main form is displayed.