I have a need to arrange the relative depth of several non-modal popup
forms. Specifically, I need to make sure one particular form is
always at the back of the others. That is, if a user happens to click
on the "background" form (which would normally bring that form to the
front), I want to execute code that would immediately send that form
to the "back-most" position.
I believe that, in general, in working with layered windows in any
system, the property I am speaking of is called something like the "Z-
value," but I do not know how to reference it in Access forms or
whether it can be set programmatically via Windows API or some other
means.
I know that it is easy to accomplish this if only two forms are
involved, by setting focus to the form-that-needs-to-be-on-top
whenever the form-that-needs-to-be-on-the-bottom is clicked. In this
particular app I will have many forms displayed at once, and setting
focus to a single form means that ONLY that form will then be in front
of the background form.
I also know that if the background form were not set to "popup" this
would not be a problem, but I need it to be popup so that I can
maximize it to take over the entire screen, hiding all the Access
menus and toolbars.
Thanks!