ralph
12/3/2011 4:22:00 AM
On Fri, 02 Dec 2011 18:12:02 -0800, BeeJ <nospam@spamnot.com> wrote:
>unfortunately Mesnews send the post before i finished editing it. Some
>keystroke I accidentally hit???
>
>Anyway, the problem is that one form jumps behind the form that
> .Show , Me
>it. WhY.
>
>Looking at the internet resources I see that there is:
> OnTop API call
>I will be calling this on three forms opened from the main form if I
>use this.
>Is this the correct way to go?
>
> Owner API call
>How is this dfferent than the ,Me ?
>
Each Form has a .ZOrder property.
Windows default behavior for what Form will appear on top are
generally determinable, but who it decides is "next" or "Last" can be
a bit of a mystery at times. There are many factors which can
influence its decision - even border styles.
Any attempt to manage the .ZOrder of Forms from Forms themselves will
ultimately prove fragile and resemble cat herding. Even if you get
something working - a change in apparently unrelated sections will
often break it.
I usually create what I call myMFIM singleton class or form. (MFIM :=
Multiple Form Interface Manager.)
I use it to create, launch, display, control lifetimes, and thus
manage .ZOrder for all Forms. Makes things simpler having it all in
one place.
-ralph