473,396 Members | 1,671 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,396 software developers and data experts.

Closing or Disposing MDI Child forms

Hy.
I have an MDI form Parent. on run-time it creates a child form Child1.
when you press a keyboard button, the Control on Child1 recieves the
KeyUp event, which raises the KeyUp event of Child1 form. The KeyUp
event of Child1 form load another form Child2 and close the Child1
form.
the problem is when I close ActiveMdiChild of the Parent form, which
is Child1 at the moment, it closes both Child1 & Parent Form.
I want to close activemdichild form without affecting its parent form.
can somebody help me please
Nov 15 '05 #1
2 11819
refer to your current Active child form in the MDI parent, and call
Dispose()

"CJack" <sh*******@hotmail.com> wrote in message
news:2e*************************@posting.google.co m...
Hy.
I have an MDI form Parent. on run-time it creates a child form Child1.
when you press a keyboard button, the Control on Child1 recieves the
KeyUp event, which raises the KeyUp event of Child1 form. The KeyUp
event of Child1 form load another form Child2 and close the Child1
form.
the problem is when I close ActiveMdiChild of the Parent form, which
is Child1 at the moment, it closes both Child1 & Parent Form.
I want to close activemdichild form without affecting its parent form.
can somebody help me please

Nov 15 '05 #2
thanks Pei_world, it does not work. My programm has been disigned that
Child1 from KeyUp event call a function in a class. this function
dispose() the active MDI child form that is Child1 here. this
function process UI requirments.
someone could suggest a smarter way out there please ...

regards

"pei_world" <pe*******@hotmail.com> wrote in message news:<Ob**************@tk2msftngp13.phx.gbl>...
refer to your current Active child form in the MDI parent, and call
Dispose()

"CJack" <sh*******@hotmail.com> wrote in message
news:2e*************************@posting.google.co m...
Hy.
I have an MDI form Parent. on run-time it creates a child form Child1.
when you press a keyboard button, the Control on Child1 recieves the
KeyUp event, which raises the KeyUp event of Child1 form. The KeyUp
event of Child1 form load another form Child2 and close the Child1
form.
the problem is when I close ActiveMdiChild of the Parent form, which
is Child1 at the moment, it closes both Child1 & Parent Form.
I want to close activemdichild form without affecting its parent form.
can somebody help me please

Nov 15 '05 #3

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

Similar topics

2
by: Ron L | last post by:
I have an MDI application which opens a number of child windows, each of which could have data in a state that needs to be saved. Each child window catches its Closing event and cancels it if the...
0
by: Andrew | last post by:
I get a Null Reference Exception if I close a modeless form (that is, a form displayed using Show()) when a selection is made from a ComboxBox. If the form is modal (displayed using ShowDialog())...
3
by: Andrew | last post by:
I get a Null Reference Exception if I close a non-modal dialog (that is, a form opened with Show()) when a selection is made from a ComboBox. The error message refers to Unsafe Native Methods, but...
6
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...
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...
3
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...
1
by: Cedric | last post by:
Hello, I have a form that could be closed by a code keyed or selected in a combobox but when I select my code my program end up with an error (NullReferenceException) and not when I keying the...
3
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...
5
by: sherifffruitfly | last post by:
Hi all, I'm certain this is stupid, but I'd like to know how to keep a form open for, say, longer than 1ms. Here's the code I'm using to open my form: TestModelFileReaderForm modelInfo = new...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
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...
0
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,...

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.