PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Closing MDIParent fails when child validation fails.

Reply

Closing MDIParent fails when child validation fails.

 
Thread Tools Rate Thread
Old 13-12-2005, 04:28 PM   #1
=?Utf-8?B?VG9kZCBEZW5saW5nZXI=?=
Guest
 
Posts: n/a
Default Closing MDIParent fails when child validation fails.


Okay here's the scenario (I'm using VS2005 pro):

I'm close a mdi child form with a text box that fails validation. In the
OnClosing event, I ask the user if they want to close anyway. If they answer
yes, I set e.Cancel to false. The form closes as it should.

Now, I try closing by clicking on the 'X' of the MdiParent. Same thing
happens ... however, in the OnClosing event of the MdiParent, the e.Cancel
event is set to true, the child form does not close, and the application
doesn't close.

Is this a bug? What would be the workaround?

Thanks Much,
Todd
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off