Suppose there are two forms: Rootwindow,subwindow, which raises an event in Rootwindow and displays Subwindow
1, if a pop-up form (such as Subwindow) simply calls the show method and does not set its Owner property:
Classrootwindow
{
void Foo ()
{
Subwindow sw = Newsubwindow ();
Sw. Show ();
}
}
The pop-up form (Subwindow) and the source form (such as Rootwindow) do not have any hierarchical relationships, that is, they are not rendered in a modal manner (Subwindow does not block the user's action against Rootwindow). Subwindow in show out in the top of the Rootwindow, but the user can click through the mouse and other ways will rootwindow to Subwindow front to cover the Rootwindow content, that is, the user focus of the window will be brought to the forefront. And the minimization of Rootwindow and Subwindow does not affect the restore operation.
2, if a pop-up form (such as Subwindow) calls the Show method and sets its Owner property:
Classrootwindow
{
void Foo ()
{
Subwindow sw = Newsubwindow ();
Sw. Owner = this;
Sw. Show ();
}
}
Then the pop-up form (Subwindow) and the source form (such as Rootwindow) will have a parent-child relationship. That is, the pop-up form will always be above the source form, but it is not modal, the user can manipulate the source form, and when the source form is minimized or restored, the pop-up form will also be minimized and restored. The contrary is not tenable.