Showdialog () pops up the modeled form
Show () pops up a non-modeled form
Mode form, which cannot be switched to the main form before being closed or hidden.
Non-mode form. You do not need to close the form if you change the focus.
Conclusion: To display important information, you can still use a mode form. For example, to delete an object, you can ensure that the object you really want to delete is
In non-mode, there is no way to know the order of form access, which is suitable for displaying some information about the program.
Application. Run () is "begins running a standard application message loop on the current thread, and makes the specified form visible." The code can be expressed:
While (getmessage (& MSG)> 0)
{
Translatemessage (& MSG );
Dispatchmessage (& MSG );
}
Directed by wm_quit, quit the application. The form. Show () method is used to display the form and exit the program immediately. If you use form. the showdialog () dialog box does not disappear immediately, but if you have other windows, form. showdialog () displays a modal window. Only when it exits can other windows be displayed. However, once the whole program is exited, other windows will never get a running opportunity, but application will be used. run.