You can place various controls in the WinDOS form, define events for the control, and so on, and the display of the form can be done through the Show method and the ShowDialog method. The difference between them is
Show: When you run the program, the new form pops up, and the new window is flashed over, minimized, and then run the following program without considering the effect of the controls in the new form on the program below.
ShowDialog: When the form is ejected, the program is interrupted in a new form, and its actions affect the following programs, making the new form affect the effect that runs below.
The life cycle of a form:
The first open form is the active window and the activated event is raised, and then the Loaded and contentrendered (content rendering) events are raised, causing the content rendering to be determined as open for the form.
After the window becomes the active window, the user can activate other windows in the same application and activate other applications. When this situation occurs, the current active window is deactivated and the Deactivated event is raised.
Call the Close () method: Close the form and release the resources for the form
Closing event, closed event: An event that is raised when closed, or closed, typically prompting the user for information such as whether to exit in the closing event.
WPF (WinDOS form)