471,344 Members | 1,487 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,344 software developers and data experts.

Bring Parent to Front (on top of modaless child)

I have a form that shows another child form using the Show()
operation. Since the child is modaless, I would like the option that
when I click anywhere on the parent form that the parent form comes in
front of the child. I added a callback in the parent form to call
BringToFront() when I selected anywhere in the parent form, but it
didn't work. Is there an option that I can specify in the child form
to allow for this behavior?
Jul 17 '08 #1
3 3499
O.B. skrev:
I have a form that shows another child form using the Show()
operation. Since the child is modaless, I would like the option that
when I click anywhere on the parent form that the parent form comes in
front of the child. I added a callback in the parent form to call
BringToFront() when I selected anywhere in the parent form, but it
didn't work. Is there an option that I can specify in the child form
to allow for this behavior?
Your button-click or whatever event that caused your parent form to open
the child form has not yet returned (i.e. your parent form is busy) and
cannot serve any more events.

If you want your parent form to continue operate independent of your
child form the child form has to be activated as a separate thread.

--
Bjørn Brox
Jul 17 '08 #2
On Jul 17, 12:04 pm, Bjørn Brox <bpb...@gmail.comwrote:
O.B. skrev:
I have a form that shows another child form using the Show()
operation. Since the child is modaless, I would like the option that
when I click anywhere on the parent form that the parent form comes in
front of the child. I added a callback in the parent form to call
BringToFront() when I selected anywhere in the parent form, but it
didn't work. Is there an option that I can specify in the child form
to allow for this behavior?

Your button-click or whatever event that caused your parent form to open
the child form has not yet returned (i.e. your parent form is busy) and
cannot serve any more events.

If you want your parent form to continue operate independent of your
child form the child form has to be activated as a separate thread.

--
Bjørn Brox
As noted in the initial post, the child was opened with SHOW ... NOT
ShowDialog. Events in the Parent window are being handled just fine.
Try again ...
Jul 17 '08 #3
On Jul 17, 1:20 pm, "O.B." <funkj...@bellsouth.netwrote:
On Jul 17, 12:04 pm, Bjørn Brox <bpb...@gmail.comwrote:
O.B. skrev:
I have a form that shows another child form using the Show()
operation. Since the child is modaless, I would like the option that
when I click anywhere on the parent form that the parent form comes in
front of the child. I added a callback in the parent form to call
BringToFront() when I selected anywhere in the parent form, but it
didn't work. Is there an option that I can specify in the child form
to allow for this behavior?
Your button-click or whatever event that caused your parent form to open
the child form has not yet returned (i.e. your parent form is busy) and
cannot serve any more events.
If you want your parent form to continue operate independent of your
child form the child form has to be activated as a separate thread.
--
Bjørn Brox

As noted in the initial post, the child was opened with SHOW ... NOT
ShowDialog. Events in the Parent window are being handled just fine.
Try again ...
OK. Figured it out ... the trick is to not specify the Parent form as
the child's "Owner."
Jul 17 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Omar Llanos | last post: by
8 posts views Thread by Waleed Seada | last post: by
reply views Thread by ACaunter | last post: by
5 posts views Thread by Iain Bishop | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.