R
Robin Tucker
I have a scenario that is to be totally honest, doing my Gnads in. The only
control I have over window Z ordering in VB.NET is by using "TopMost=True",
or "TopMost=False". There is no "z-order" concept that I can play with
apart from this single binary choice.
Now, think about where it might be useful to have fine grained control over
Z order: I have a main form, which pops up modeless "property" windows. I
want these property windows to remain in front of the main form because
otherwise it might be easy for a user to "lose one" behind the main form. I
also run a thread that needs to pop up a modal progress bar every now and
then. I want this to be top most of course when it's running, but I don't
want it to be topmost if I need to display an error form or message of some
kind while the thread is running, I want the error form to be topmost.
When the user presses F1 for help, I obviously want the help to be topmost.
I do not want any of my windows to remain topmost when the user launches
another process.
Now this might seem like a complex scenario, but in fact I think it's
probably a fairly common one. I'm not comfortable with piddling about with
the topmost property continually to micro-manage form visibility, when I
should simply be able to give a number on a form property that gives some
kind of Z order priority to each of my forms, relative to my executable.
Any ideas on how to manage these situations? TopMost does exactly what it
says on the tin, unfortunately!
control I have over window Z ordering in VB.NET is by using "TopMost=True",
or "TopMost=False". There is no "z-order" concept that I can play with
apart from this single binary choice.
Now, think about where it might be useful to have fine grained control over
Z order: I have a main form, which pops up modeless "property" windows. I
want these property windows to remain in front of the main form because
otherwise it might be easy for a user to "lose one" behind the main form. I
also run a thread that needs to pop up a modal progress bar every now and
then. I want this to be top most of course when it's running, but I don't
want it to be topmost if I need to display an error form or message of some
kind while the thread is running, I want the error form to be topmost.
When the user presses F1 for help, I obviously want the help to be topmost.
I do not want any of my windows to remain topmost when the user launches
another process.
Now this might seem like a complex scenario, but in fact I think it's
probably a fairly common one. I'm not comfortable with piddling about with
the topmost property continually to micro-manage form visibility, when I
should simply be able to give a number on a form property that gives some
kind of Z order priority to each of my forms, relative to my executable.
Any ideas on how to manage these situations? TopMost does exactly what it
says on the tin, unfortunately!