473,405 Members | 2,141 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,405 software developers and data experts.

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 2147
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
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...
4
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...
8
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)...
2
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
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...
1
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...
3
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)...
8
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...
3
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...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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,...
0
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...
0
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...
0
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...

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.