473,756 Members | 6,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Child windows open behind the main parent window

84 New Member
Hi All,

I am facing a weird problem when opening multiple windows in my C# Winform application.

In the application I have a parent window and multiple child windows which are opened as and when user interact with the main window.

For some weird reason the child window appear for an instance and disappear behind the parent application.

I tried all of the following but nothing works -

ChildForm.Show( );
ChildForm.Focus ();
ChildForm.Bring ToFront();
ChildForm.Activ ate();

I am calling these from parent window. My main application is MDI, however these child windows are not MDI child - they are seperate windows.

Can anyone please help on this?

Thanks!
Jul 2 '08 #1
3 4553
nmsreddi
366 Contributor
Hello

If your parent form is MDI parent and childs are not MDI childs ,then when ever the focus moves out of the child form ,ultimately the forms which is active will be displayed .if you want to display some thing like only one child at a time then you can use ShowDialog() method instead of Show();

if your child forms are not MDI you may also get another problem ,like when you close the main Parent MDI form with child forms open ,then the child forms still remains open. better make child forms also MDIchilds or use ShowDialog();
Jul 2 '08 #2
alag20
84 New Member
Hi

Infact these child windows were MDI child of the main window. But the requirements changed and I had to make them separate windows.

Apart from that there can be multiple child windows open at the same time so that user can browse through them and do various operations. Hence ShowDialog() is not ideal solution.

Thanks
Jul 2 '08 #3
nmsreddi
366 Contributor
Hello

if you want to open many forms at a time , i suggest if number of forms are less

then better use Tab control ,which may solve your problem,Tab control allow user to browse all the available Tabs, but it is feasible only for a limited number of forms.



Regards
nmsreddi
Jul 3 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
24776
by: gokul | last post by:
Hi all, Iam using mozilla firebird. I have three popups displayed at one point of time...if I close one the other two goes hidden....could you please suggest me the reason for this behaviour and how to overcome it..... While I opened......these child windows(popup)...from the main window I have given "dependent=yes" in the window.open statement. The sameway I want to close the Child windows opened from the parent
2
1454
by: steve | last post by:
How do I open this page in the same window? function goTo(form) { var myindex=form.cata.selectedIndex window.open(form.cata.options.value); } <input type="Button" value="Submit" onClick="goTo(this.form)"> Thanks
2
12090
by: Mel | last post by:
is it possible to get a list of all child windows (poped from a parent window) ? and close all of them ? thanks for help
3
3754
by: Isabel | last post by:
How can you close all child browser windows that where open by a parent browser window? I have links on a parent (main) page that opens the child page as a separate browser. However, I need to be able to close all the opened child browser pages from the parent page. Thank you for your help, Isabel
3
3492
by: rick2910 | last post by:
Hello, I have a problem with a popup. In this popup (child) are several links. I want these links to open in A NEW parent window. Code: <a href="javascript:;" onclick="opener.location.href='http://www.test.com/'">Link name</a>
7
1639
by: itsali | last post by:
Hi All, Thanks for such a network we have here. I need to close all the child windows opened by my parent window using javascript. How do i do that.But i dont have reference to those childs (point to note).Hope there might be a way to do it which resides in your mind.Need some exposure from you . Looking ahead of ur kind response thanks a million . Knowledge is what expand , when shared ! (52)
1
1584
by: Bhishm | last post by:
Hi, I am opening a child window from parent using window.open, but on refreshing the parent the reference of the child is lost. Is there any way to save the reference of the child in the parent after refresh. I have searched a lot but not able to find any relevant information
6
2256
by: Inny | last post by:
Hi Im looking for a way to open all links (in a child window) in the parent window instead. I want this to happen Automatically because links in my child are called from the parent but I cannot alter link targets. <base target="x">(in child head tags) dont work, though some will launch a new window. I found this code idea that does work (see below) but I have no way of assigning the 'loadinparent' attribute to my childwindow links. Can I do...
0
9303
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9894
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9679
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9541
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8542
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4955
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3141
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.