Ciclo de vida de una Ventana
Esta es una pequeña explicación de la nacimiento y muerte de una ventana.
-
There are two types of windows: real top-level windows and embedded windows (like the one embedded inside a tabstrip in the IDE).
-
A window can be persistent or not. A non-persistent window is destroyed when you close it. A persistent window is just hidden.
-
A window can be opened in modal (blocking) and non-modal (non-blocking) mode. The modal mode is implemented by using a local evento loop. An embedded window opened in modal mode is temporarily made top-level.
-
The first time a window is shown, an Open event is raised.
-
A window can be closed by calling the Close método or by clicking on the close button of the window manager if the window is a top-level window.
-
When a window is closed, a Close event is raised. If this event is not stopped, then the window is hidden. If the window is not persistent, it is destroyed too. If the window was opened in modal mode, then the local event loop used for implementing the modal mode is left.
-
When a window has been closed, it can be opened again, and the Open event will be raised again.
-
The integer argument of the Close method is returned by the ShowModal method.
-
If you call Close during the Close event, the method does nothing.
-
If you call Close during the Open event, the window is not opened.
-
If you call Show or ShowModal while the window is being shown, the method does nothing.