473,386 Members | 1,720 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,386 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 3676
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.