G
Guest
Is there something that can change the TopMost=true status of a form to
become false at a later time during running?
My code only has the statments
this.TopMost = true;
A search for TopMost only finds these statements within
#region Windows Form Designer generated code
I am testing with Notepad.exe active and maximized. My L-shape (see
following description) should appear on the bottom and right of the
screen...even while I am typing in Notepad. Everything works for a while
until I open a new form. This new form is opened with ShowDialog() and has a
datagrid control on it...not sure if this makes any difference...although an
empty form with no controls does not cause the TopMost status of its parent
to be lost.
My application includes four forms that are displayed in TopMost, so they
always appear in the bottom 200 pixels and right 200 pixels of the screen.
IOW each form is responsible for painting part of the L-shape. The L-shape
acts like a task bar in that it is always topmost.
All four forms have the same parent. It is my Form1, and it has a window
frame. The other four forms have FormBorderStyle=None. My Form1_Load creates
the other four forms.
// create child windows
PeopleWaiting wPW = new PeopleWaiting();
wPW.Owner = this;
wPW.Show();
DisplayPlate wDP = new DisplayPlate();
wDP.Owner = this;
wDP.Show();
DisplayScene wDS = new DisplayScene();
wDS.Owner = this;
wDS.Show();
ReportLauncher wRL = new ReportLauncher();
wRL.Owner = this;
wRL.Show();
Form1 becomes invisible to the user, because its size and location puts it
directly behind the PeopleWaiting form.
Everything works well until I create a sixth form in my application. It is
created with the button click of the ReportLauncher form.
Form6 r = new Form6();
r.Owner = this; // this is the ReportLauncher form
r.ShowDialog();
Everything works well means.
1) I mouseclick on Notepad and I can type characters while I see my L-shape
of forms. Notepad's scroll bars and window control buttons are covered by my
L-shape.
2) I mouseclick somewhere on PeopleWaiting and Notepad title bar becomes gray.
3) I mouseclick somewhere on Notepad and the title bar becomes blue, while I
can see my L-shape of forms.
4) I continue to type characters into Notepad.
My L-shape looses its TopMost status after the following steps
4) I mouseclick on a button of the ReportLauncher form and it creates a new
popup form
5) I close Form6 by clicking its close button
6) I mouseclick on Notepad
7) Now, the maximize status of Notepad covers up the L-shape. Only Notepad
is visible on the screen.
How did the forms in my application get to the back of the Z-order?
become false at a later time during running?
My code only has the statments
this.TopMost = true;
A search for TopMost only finds these statements within
#region Windows Form Designer generated code
I am testing with Notepad.exe active and maximized. My L-shape (see
following description) should appear on the bottom and right of the
screen...even while I am typing in Notepad. Everything works for a while
until I open a new form. This new form is opened with ShowDialog() and has a
datagrid control on it...not sure if this makes any difference...although an
empty form with no controls does not cause the TopMost status of its parent
to be lost.
My application includes four forms that are displayed in TopMost, so they
always appear in the bottom 200 pixels and right 200 pixels of the screen.
IOW each form is responsible for painting part of the L-shape. The L-shape
acts like a task bar in that it is always topmost.
All four forms have the same parent. It is my Form1, and it has a window
frame. The other four forms have FormBorderStyle=None. My Form1_Load creates
the other four forms.
// create child windows
PeopleWaiting wPW = new PeopleWaiting();
wPW.Owner = this;
wPW.Show();
DisplayPlate wDP = new DisplayPlate();
wDP.Owner = this;
wDP.Show();
DisplayScene wDS = new DisplayScene();
wDS.Owner = this;
wDS.Show();
ReportLauncher wRL = new ReportLauncher();
wRL.Owner = this;
wRL.Show();
Form1 becomes invisible to the user, because its size and location puts it
directly behind the PeopleWaiting form.
Everything works well until I create a sixth form in my application. It is
created with the button click of the ReportLauncher form.
Form6 r = new Form6();
r.Owner = this; // this is the ReportLauncher form
r.ShowDialog();
Everything works well means.
1) I mouseclick on Notepad and I can type characters while I see my L-shape
of forms. Notepad's scroll bars and window control buttons are covered by my
L-shape.
2) I mouseclick somewhere on PeopleWaiting and Notepad title bar becomes gray.
3) I mouseclick somewhere on Notepad and the title bar becomes blue, while I
can see my L-shape of forms.
4) I continue to type characters into Notepad.
My L-shape looses its TopMost status after the following steps
4) I mouseclick on a button of the ReportLauncher form and it creates a new
popup form
5) I close Form6 by clicking its close button
6) I mouseclick on Notepad
7) Now, the maximize status of Notepad covers up the L-shape. Only Notepad
is visible on the screen.
How did the forms in my application get to the back of the Z-order?