Link to home
Start Free TrialLog in
Avatar of dkloeck
dkloeckFlag for Spain

asked on

TopMost problem

Hi Experts!,

When clicking on a parentForm's button a new childForm is shown.
The problem was that sometimes the childWindow was behind the parentForm (this shoudl never happen)
therefore I made the childForm TopMost, but then the child form is in front of all applications..even in front of VS when debugging. How can I make the childForm be just one level in front of the parentWindow?

btw. childForm is NoModal

Thanks in advance,
DK
Avatar of lucky_james
lucky_james
Flag of India image

try using the following funda:
when parent is getting the focus:
       check is child window object exists.
                if yes, shift the focus on child window.



Avatar of Darren
Hi,

Could you create an MDI application instead?

Darren

Avatar of dkloeck

ASKER

lucky_james: isn't there an easier way?
DarrenD: No, It's a very big program already, and it is dialog based
i am afraid to say 'perhaps no'
its pretty easy in itself.....all you need to catch an event in parent dialog.
ASKER CERTIFIED SOLUTION
Avatar of Henrici
Henrici

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial