Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / December 2006

Tip: Looking for answers? Try searching our database.

Office like closing childform warning message.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jose Fernandez - 21 Dec 2006 14:47 GMT
Hello

i am creating an application. It's an MDI parent with all the child.

I have been trying using the OnClosing event in every child. It works OK BUT
not the way it should be. The problem is that when i close one child form
individually, it works fine. when i close the mdi parent, it also closes all
the windows BUT

for example.

i have a parent with 5 child.
i close 1 child individually, everything works fine.
i close the mdi parent. (problem) the OnClosing of the main parent,
automatically, call all child OnClosing event. That's ok. But it popups the
4 dialog box for OK, CANCEL one after the other. And what i want is to bring
every childform to front and then popup the dialog box, so the user "see"
the document being closed and then accept or cancel to close it. does it
makes sense? I have tried a couple of tricks by creating an arraylist with
all the forms and then on the Closing event of the main parent iterate but
it doesn't work because by the time my first line of code starts inside the
Closing event, already all the closing events of the child were triggered.

Does anyone knows how to achieve this?

Thank you
RobinS - 21 Dec 2006 21:42 GMT
You could invoke the closing of the children yourself
in the FormClosing event of the parent.  That would give
you control over the closing of the children.

Robin S.
----------------
> Hello
>
[quoted text clipped - 23 lines]
>
> Thank you

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.