473,804 Members | 3,049 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MDI form and children form hierarchy

Hello,

Is it possible to create inside MDIForms additional child forms which also
have form children?

For my application it is necessary to create a hierarchy of forms, e.g.

MainMDIForm
Child 1
Child 2
Child 2.1
Child 2.2
Child 2.2.1
Child 3
............... ......

It must be possible that on closing of the form Child 2 all children
2.x.x.x close automatically with it.

I have tested the built-in properties Form.MDIParent and Form.Owner.
With "Owner" one can built the hierarchy, but the children are then no
longer "hooked" into the MDI form.
They are actually completely independent and cannot be automatically
graphically arranged anymore.

It seem that there is only an "either - or" solution.
Either directly MDI child using "MDIParent" or form based hierarchy using
"Owner" .

Has anyone better proposal to solve such a problem?
I have a simple idea but I am not sure if this would work.
I could store in my Parent Form Classes a typed ArrayList which contains
links/references to my children forms.
The problem I see is the required manual management for adding new forms,
closing them, deleting them
and releasing all resources using the ArrayList.

Any help is really appreciated

Thank you
Cheers

Carsten

Dec 7 '06 #1
1 2172
Have you tried:
Form f = new Form();
f.Parent = this;
f.Show();

This sets the present form as the parent of f. I don't know of any
restrictions to running the same code in f for a child form g.
CDrue wrote:
Hello,

Is it possible to create inside MDIForms additional child forms which also
have form children?

For my application it is necessary to create a hierarchy of forms, e.g.

MainMDIForm
Child 1
Child 2
Child 2.1
Child 2.2
Child 2.2.1
Child 3
............... .....

It must be possible that on closing of the form Child 2 all children
2.x.x.x close automatically with it.

I have tested the built-in properties Form.MDIParent and Form.Owner.
With "Owner" one can built the hierarchy, but the children are then no
longer "hooked" into the MDI form.
They are actually completely independent and cannot be automatically
graphically arranged anymore.

It seem that there is only an "either - or" solution.
Either directly MDI child using "MDIParent" or form based hierarchy using
"Owner" .

Has anyone better proposal to solve such a problem?
I have a simple idea but I am not sure if this would work.
I could store in my Parent Form Classes a typed ArrayList which contains
links/references to my children forms.
The problem I see is the required manual management for adding new forms,
closing them, deleting them
and releasing all resources using the ArrayList.

Any help is really appreciated

Thank you
Cheers

Carsten
Dec 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2042
by: Marco Alting | last post by:
Hi I'm trying to create an input screen that allows users to create a hierarchical structure as the one below, but have no clue where to start or how to construct it. Can anyone help me out here? There must be a way to let users create something like this using an input form: Level Description Price
4
9304
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form action="MaintNotification.php?ReqID=5" method="post" name="frm5"> <tr align="left" bgcolor="#dddddd" class="text" onClick="submit()"
8
2327
by: Tim Geiges | last post by:
Since I am being challenged with learning c# I figured I could pass some of the pain on to you guys :-) I have another question(this one is important for me to fix before I can get my app to Beta) My app (an image viewer) opens with a Main form with a file explorer if you open the program with the exe, but opens with the ImageView form if you double click an image file, if you want to see the Main form once the ImageView is open the...
2
1729
by: ahaupt | last post by:
Hi all, Just a quick one: At the moment I use an ArrayList to store 'n Tree classes' children. Is this the best/quickest structure to use? What do you guys use? Best, Andre
1
1766
by: Jon Turner | last post by:
My intention is to be able to open an assembly and for each form, list the form's children's controls. Can someone please tell me how this can be accomplished ? I am familiar with how to get Methods/properties using reflection, but seem to be in the dark about the form's children's controls. Many Thanks in Advance
1
2151
by: Diane Yocom | last post by:
I'm still very new to ASP.Net, so wanted to get some advice on how to solve the following design problem (sorry my explanation is so long): I'm developing an ASP.Net intranet app (using VB.Net for my business objects) that will allow my users (max of about 25) to enter information about families and their children. On one page, I need to collect general information about the family (such as address and phone number) and specific...
3
2605
by: Chris | last post by:
Before I started to create table, etc to track unique form field record number assigments I thought I'd check to see if there is now a better way to do this in .NET. I have a parent form (table) and children form (table). Relationship equals one to many. I'd like to auto number the fields accordingly and traditionaly I assign a unique number based on a table value that I retrieve + 1. i.e. Parent record field value = 1 Children record...
8
1842
by: BD | last post by:
Moving from MS Access to .Net using C# languag. Problem trying to duplicate form with structure as follows: 1. Main form 'Work Order' displayed as textboxes 2. subform 'Customers' textboxes showing name, address, etc related by 'CustomerID' 3. subform 'Locations' textboxes showing name, address, etc related by 'LocationID' 4. subform 'Material' on tabbed interface datasheet related by 'WorkOrderID' 5. subform 'Labor' on tabbed...
3
3333
by: krzysztof.konopko | last post by:
Hello! I want to design a class hierarchy with one base abstract class, let's say CBase. I have a predicate that every object in the class hierarchy must have a parent object of type from this class hierarchy but only objects of some of these types can be a parent. Example: class CFruit : public CBase { }; class CBranch : public CBase { };
0
9704
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
9572
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10562
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
10319
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...
0
10070
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
9132
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
6845
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();...
1
4282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2978
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.