473,241 Members | 1,385 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 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 3666
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Omar Llanos | last post by:
I have Form1 and Form2 (which is inherited from Form1), and I created a button in Form2 that will fill up a textbox in Form1. What code would do that? I tried the simplest way: //from child...
8
by: Waleed Seada | last post by:
Hi all What need to be done to get the MDI parent call his MDI children Events, methods Thanks in advance /WS
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
0
by: ACaunter | last post by:
HI there.. I have a dropdown menu for my asp.net website (not a combo box with the down arrow).. its for Home, Compant, ... , Contact Us... and then when the mouse goes over it, the sub menus are...
1
by: Michael | last post by:
Hi Everyone, I seem to be having a problem accessing a menuitem on the MDIParent from a child form. From a login (frmSecurity -child form) screen, I need to hide a menuitem based on the users...
5
by: Iain Bishop | last post by:
I have a simple form with 4 command buttons and 1 label. The label is sometimes visible and sometimes not. When it is visible I want it to be in front of the buttons. I've tried bringing the label...
1
by: Eric | last post by:
I want to call a method on the MDI parent from the child. Basically the method will set some text (message) on a status strip and show the appropriate icon (for the type of message). I'd also...
1
by: bhargavi ramineni | last post by:
I have used the following javascript code to get a child window for parent window. childWin...
7
by: markrandolph | last post by:
I have parent.htm and child.htm ================================================================= In parent.htm we have: var parentarray = new Array(5) window.open("child.htm",.....) ...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.