473,396 Members | 1,834 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.

Question regarding MDIParent form and child forms

I've got an MDI Parent which hosts several child forms. When the
application closes (either through a File|Exit call or by clicking on the
"X" in the upper right corner), I check to see if any of the children are
"dirty" and display a "Save\Save All\Save None" form similar to Query
Analyzer.

I had thought about putting the code to display this form within the MDI
Parent's "Closing" event, but the children's closing events are called prior
to this, and the data is already lost. How can I tell without using the
Parent's "closing" event that the MDI Parent is closing?

Or is there a better way to accomplish this?

Cheers, Jon
Nov 16 '05 #1
1 2238
hi
you can do one thing
in the childs closing event check whether the child is dirty .if it is
dirty write e.Cancel=true ;
This will cancel the closing event of child and the parent

hope this solves your problem

regards
Ansil
Dimensions
Technopark
Trivandrum
"Jon Pope" wrote:
I've got an MDI Parent which hosts several child forms. When the
application closes (either through a File|Exit call or by clicking on the
"X" in the upper right corner), I check to see if any of the children are
"dirty" and display a "Save\Save All\Save None" form similar to Query
Analyzer.

I had thought about putting the code to display this form within the MDI
Parent's "Closing" event, but the children's closing events are called prior
to this, and the data is already lost. How can I tell without using the
Parent's "closing" event that the MDI Parent is closing?

Or is there a better way to accomplish this?

Cheers, Jon

Nov 16 '05 #2

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

Similar topics

2
by: Terrance | last post by:
I'm hoping that there's someone out here that can help me with a coding problem. Here is the scenerio: I have a MdiParent Form on this MdiParent form there is a listview control and several text...
1
by: John Underwood | last post by:
Hi.. I have a MDI with three additional child forms.. They can be form1, form2, and form3 for this example.. I understand how to open these three forms from my MDI, that works fine.. What I can't...
1
by: PDP-8E | last post by:
I'm new to VB.Net 2003 - (2 weeks in) so this MAY be straightforward... (Things changed since Octal Assembler I see !!!) I'll try to lay this out in a way that makes sense I created a...
2
by: Terrance | last post by:
I'm hoping that there's someone out here that can help me with a coding problem. Here is the scenerio: I have a MdiParent Form on this MdiParent form there is a listview control and several text...
2
by: Robert Johnson | last post by:
Hi all. I have a MDI child form that is a systems maintenance form. I have 7 buttons that will be used to call 7 lookup table maintance forms. My code to call the lookup table child forms from...
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: 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?
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
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
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...

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.