473,386 Members | 1,733 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.

MDI parent/Child

Hi,

I have built a MDI application with three child forms. I
want to be able to close ChildForm 3 from ChildForm 2 but
can not get them to see each other. It just keeps
opening a new instance of the form and will not close the
form. Any advice, examples, help would be appreciated.

Darci
Jul 21 '05 #1
3 1152
Do you have an example of that you can post....I would
really appreciate it!

Darci
-----Original Message-----
I'm sort of new to this but when I attempted something
like that I had to use a delegate from form2 to report
back to the parent and have the parent do the dispose of
form 3.
-----Original Message-----
Hi,

I have built a MDI application with three child forms. Iwant to be able to close ChildForm 3 from ChildForm 2 butcan not get them to see each other. It just keeps
opening a new instance of the form and will not close theform. Any advice, examples, help would be appreciated.

Darci
.

.

Jul 21 '05 #2
Sorry, i don't have the code anymore as i dropped the mdi
idea and went to a one window solution for my project but
it was based on an article from codeproject.com and one
from c-sharpcorner.com Here are the links to the articles.

http://www.codeproject.com/csharp/mdiformstutorial.asp and
http://www.c-
sharpcorner.com/Code/2002/June/CommBetweenForms.asp

Good luck!
-----Original Message-----
Do you have an example of that you can post....I would
really appreciate it!

Darci
-----Original Message-----
I'm sort of new to this but when I attempted something
like that I had to use a delegate from form2 to report
back to the parent and have the parent do the dispose of
form 3.
-----Original Message-----
Hi,

I have built a MDI application with three child forms.Iwant to be able to close ChildForm 3 from ChildForm 2butcan not get them to see each other. It just keeps
opening a new instance of the form and will not closetheform. Any advice, examples, help would be appreciated.

Darci
.

.

.

Jul 21 '05 #3
and watch out. The c-sharpcorner article shows the
delegate added in the private void InitializeComponent()
code. Don't add code here as it is part of the windows
forms generated code and will be lost when you add new
items to the menu. add the code after Initialize component
()
in the TODO: area
//
// TODO: Add any constructor code after initialize
Component
//
otherwise your delegate will disapear and drive you nuts
like it did to me! good luck!

-----Original Message-----
Sorry, i don't have the code anymore as i dropped the mdi
idea and went to a one window solution for my project but
it was based on an article from codeproject.com and one
from c-sharpcorner.com Here are the links to the articles.

http://www.codeproject.com/csharp/mdiformstutorial.asp andhttp://www.c-
sharpcorner.com/Code/2002/June/CommBetweenForms.asp

Good luck!
-----Original Message-----
Do you have an example of that you can post....I would
really appreciate it!

Darci
-----Original Message-----
I'm sort of new to this but when I attempted something
like that I had to use a delegate from form2 to report
back to the parent and have the parent do the dispose ofform 3.
-----Original Message-----
Hi,

I have built a MDI application with three child forms.
I
want to be able to close ChildForm 3 from ChildForm 2

but
can not get them to see each other. It just keeps
opening a new instance of the form and will not close

the
form. Any advice, examples, help would be

appreciated.
Darci
.

.

.

.

Jul 21 '05 #4

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

Similar topics

1
by: ahaideb | last post by:
I have a table (relation) in my database: --------------- | parent | child | --------------- | 1 | 2 | | 1 | 3 | | 2 | 4 | | 2 | 5 ...
7
by: David Sobey | last post by:
hi Here's some code: void SomeFunc(childClass arg); .... parentClass a; a=new childClass(); SomeFunc(a);
6
by: jalkadir | last post by:
Let's say that I have this class: class Parent{ private: char* str; public: const char* getStr(){return str;} }; And then I create a child class class Child{ private: std::string str;...
4
by: Danny Tuppeny | last post by:
Hi all, I've been trying to write some classes, so when I have a parent-child relationship, such as with Folders in my application, I don't have to remember to add a parent reference, as well as...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
7
by: msxkim | last post by:
How to execute functions in the parent class first and then functions in the child class? For example, I have a parent class with functions 'ONE' and 'TWO' and child class has a function 'THREE'. ...
3
by: Eddie | last post by:
If FormMain = MDI parent, FormSub = Child parent, I execute FormSub from the menu like this way. FormSub^ sub = gcnew FormSub; sub->MdiParent = this; sub->Show(); This can generate child...
10
by: Goran Djuranovic | last post by:
Hi all, Does anyone know how to declare a variable in a class to be accessible ONLY from a classes instantiated within that class? For example: ************* CODE ***************** Public...
6
by: Sashi | last post by:
class parent{ Parent(){}; ~Parent(){}; } Child: public Parent{ Child(){}; ~Child(){};
4
by: jewel87 | last post by:
Hi everyone! I'm writing some code in C under UNIX, which should give some output like this: PARENT: pid = 10063 CHILD: my pid = 10064 CHILD: my parent's pid = 10063 CHILD: Sleeping... PARENT:...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...

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.