By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,615 Members | 1,961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,615 IT Pros & Developers. It's quick & easy.

Issue with disposed event of MDI Parent

P: 20
I'm writing an application using an MDI Parent and 2 children. When the user closes the parent, I would like to have the program check something in one of the children, and then ask whether or not the user wishes to continue.

I have tried testing the Disposed event by having a MessageBox.Show show a window that simply said "Closing!", but when you close the parent, all you hear is the ding that a message box makes, but then it continues closing and you never see the message.

If someone has help, Please help me. Sorry, I'm very new to VB.
Apr 22 '07 #1
Share this Question
Share on Google+
4 Replies


Expert 5K+
P: 8,434
How/where did you show the dialog? Seems as though the QueryUnload event procedure on the parent form would be the place to check.
Apr 23 '07 #2

P: 20
I'm trying to show the message in the form1.disposed event. Basically, what i'm trying to do is like the "There are unsaved documents, do you wish to save?" box that pops up when you try to close Microsoft word. Except the program just keeps on closing.

I don't see a function called QueryUnload in the function list of the form. Like I said, I'm quite new to this.
Apr 23 '07 #3

Expert 5K+
P: 8,434
I'm trying to show the message in the form1.disposed event. Basically, what i'm trying to do is like the "There are unsaved documents, do you wish to save?" box that pops up when you try to close Microsoft word. Except the program just keeps on closing.

I don't see a function called QueryUnload in the function list of the form. Like I said, I'm quite new to this.
Well, we may be talking about different versions of VB, in which case the details will probably differ significantly. In VB6 (and earlier) the form has a QueryUnload and an Unload event. Whether this applies to the child form, I don't know.
Apr 23 '07 #4

P: 20
oh. I'm using VB 2005, the newest one. And i've heard that they are pretty different
Apr 23 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.