bringing a separate .exe to the front

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

when using one form - i can set the z-order. Is there a way programatically
to create a "z-order" across .exe.

I have 2 .exe - one that paints a background form and then another that
fills in the middle of the screen on top of that form. The .exes need to be
separate, although the middle .exe knows about the size of the outer
background/border form via a remoted object and events that get triggered on
resize.

Everything is working fine size wise, except I can't seem to get the middle
screen/exe to show up on top when the outer border has been selected or
re-sized/moved.

Any ideas?

Thanks,
Terry
 
Everything is working fine size wise, except I can't seem to get the middle
screen/exe to show up on top when the outer border has been selected or
re-sized/moved.
Have you tried using TopMost=True for the form that shall be on top. This
way that form always will be on top of the other form. It will also be on
top of all other windows so if you select a different window/program this
window still will be on top...

An another way is to have a timer (in the front form program) that checks
where the window of background form is and position the front form
accordingly. If the background program is minimized then the front program
also should minimize.

There probably are .NET functions/classes for doing this but to get you
started here are some WIN32 functions that are useable:

EnumWindows()
GetWindowPlacement()
SetWindowPlacement()

// Anders
 
Terry,

This sounds so strange that you make me curious. Using one Exe your problem
is simple, will you tell us what is the reason you *should* use 2 exe's. I
never heard of that and therefore very curious becaus it sounds if the forms
are very thight depending from each other.

Cor
 
Back
Top