473,586 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Closing child forms in MDI parent one?

al
Greetings,

If I instansiate child forms in MDI parent, what is the way to close
them. I can't find an event related to child to do such task. I want
to close 3 child forms, all in the same parent.

MTIA,
Grawsha
Nov 20 '05 #1
8 4171
"al" <gr*********@ya hoo.com> schrieb

If I instansiate child forms in MDI parent, what is the way to
close them. I can't find an event related to child to do such task.
I want to close 3 child forms, all in the same parent.


The MdiChildren property of the parent returns a list of all open Mdi child
windows. Each child has also a Close event you can handle.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* gr*********@yah oo.com (al) scripsit:
If I instansiate child forms in MDI parent, what is the way to close
them. I can't find an event related to child to do such task. I want
to close 3 child forms, all in the same parent.


\\\
Me.MdiChildren( 2).Close()
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
al
hi************* **@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<#J******* *******@TK2MSFT NGP11.phx.gbl>. ..
* gr*********@yah oo.com (al) scripsit:
If I instansiate child forms in MDI parent, what is the way to close
them. I can't find an event related to child to do such task. I want
to close 3 child forms, all in the same parent.
\\\
Me.MdiChildren( 2).Close()
///


This is not exactly what I want.It is what event/s I should use in the
MDIparent or any other to triger the closing of the child forms. That
is,

'What event I should use to trigger this event? Me.MdiChildren( 2).Close()

Nov 20 '05 #4
al
hi************* **@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<#J******* *******@TK2MSFT NGP11.phx.gbl>. ..
* gr*********@yah oo.com (al) scripsit:
If I instansiate child forms in MDI parent, what is the way to close
them. I can't find an event related to child to do such task. I want
to close 3 child forms, all in the same parent.
\\\
Me.MdiChildren( 2).Close()
///


This is not exactly what I want.It is what event/s I should use in the
MDIparent or any other to triger the closing of the child forms. That
is,

'What event I should use to trigger this event? Me.MdiChildren( 2).Close()

Nov 20 '05 #5
"al" <gr*********@ya hoo.com> schrieb
This is not exactly what I want.It is what event/s I should use in
the MDIparent or any other to triger the closing of the child forms.
That is,

'What event I should use to trigger this event?
Me.MdiChildren( 2).Close()

"Each child has also a Close event you can handle."
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #6
"al" <gr*********@ya hoo.com> schrieb
This is not exactly what I want.It is what event/s I should use in
the MDIparent or any other to triger the closing of the child forms.
That is,

'What event I should use to trigger this event?
Me.MdiChildren( 2).Close()

"Each child has also a Close event you can handle."
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #7
* gr*********@yah oo.com (al) scripsit:
If I instansiate child forms in MDI parent, what is the way to close
them. I can't find an event related to child to do such task. I want
to close 3 child forms, all in the same parent.


\\\
Me.MdiChildren( 2).Close()
///


This is not exactly what I want.It is what event/s I should use in the
MDIparent or any other to triger the closing of the child forms. That
is,

'What event I should use to trigger this event?
Me.MdiChildren( 2).Close()


That's not an event, that's a method call. Call it where you want to
close the form, for example in a button's 'Click' event handler.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #8
"Armin Zingler" <az*******@free net.de> schrieb
"al" <gr*********@ya hoo.com> schrieb
This is not exactly what I want.It is what event/s I should use
in the MDIparent or any other to triger the closing of the child
forms. That is,

'What event I should use to trigger this event?
Me.MdiChildren( 2).Close()

"Each child has also a Close event you can handle."


Excuse me please, it is the Closed event, not the Close event. Close is a
method.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #9

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

Similar topics

5
2248
by: Ron L | last post by:
I have an MDI application with a number of child windows. In each child window I am catching the Closing event and having the child window decide if it should set cancel to true. The intent here is to ensure that no child window can close while it is in a state where user entered information can be lost. I have just noticed that while the...
1
5806
by: Chris Bruce | last post by:
In my application I need a way to distiguish between the following events: 1. When a user closes an MDI child window. 2. When the user closes the MDI parent window which subsequently closes the MDI child window. My application does certain logic when the user actually closes the MDI child form by clicking the "X" in the upper right hand. ...
6
3668
by: Barry Gast | last post by:
Hi. I have an MDI Parent form with multiple child windows. When I close the parent form, the Closing events of the children forms are not executing. Do I have to close all the child forms in the parent's closing event in order to get the closing events of the children forms to execute? Thanks. -Barry
10
4002
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 application. What should happen, is that the main MDI form should close, taking the child forms with it. There is code to loop through the child forms,...
3
2770
by: Charles Law | last post by:
Under what circumstances would e.Cancel be set to True on entry to the Closing event of an MDI child form? I have found that this is why my application won't close properly. I can explicitly set the value to False, but I would have expected it to be False on entry. TIA Charles
3
1346
by: Sumit | last post by:
HI.. I am having problem ot determine that a parent form is closing or not in my VB.Net code Any help Sumit
3
6357
by: Oenone | last post by:
I'm writing an application with various MDI child forms. In the Closing event of many of the forms, I have code that asks the user whether he is sure he wants to close the form, because it contains unsaved data. If the user clicks "No" then the code sets e.Cancel = True, which cancels the closure. This works just great. But when the user...
0
946
by: vvenk | last post by:
Hello: I have an MDI application. The application has a MDI Parent and several MDI children forms. While the MDI parent makes sure that all child forms are closed before the application shuts down, the child forms' closing event makes sure the user is presented with an option to save the data on them should they have changed. I found the...
23
2719
by: Chukkalove | last post by:
Im sorry, I dont know the correct description for a hierarchy of parent and child forms. I have a main form that opens a child form modally. This child form in turn opens it's own child form modally. I also have a separate thread running that monitors a card reader. If the user removes the card then the thread calls back the main form to tell...
0
7915
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...
0
7841
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...
0
8204
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. ...
0
8339
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...
0
8220
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...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1184
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...

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.