[Mono-bugs] [Bug 78715][Nor] New - Form.MdiChildren don't get Closing event fired.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Jun 27 01:29:47 EDT 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by unserkonig at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=78715
--- shadow/78715 2006-06-27 01:29:47.000000000 -0400
+++ shadow/78715.tmp.28628 2006-06-27 01:29:47.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 78715
+Product: Mono: Class Libraries
+Version: 1.0
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com
+ReportedBy: unserkonig at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Form.MdiChildren don't get Closing event fired.
+
+Form.MdiChildren don't get Closing event fired (the MdiChildren's Closing
+event should also be fired before the Closing event of the mdi container
+form, as described in the msdn documentation).
+
+Steps to reproduce the problem:
+1. Compile the sample.
+2. Run it and close the main form (which is the mdi container).
+
+// Sample
+//
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+using System.ComponentModel;
+
+public class Test
+{
+ static void Main ()
+ {
+ TestForm form = new TestForm ();
+ Application.Run (form);
+ }
+}
+
+public class TestForm : Form
+{
+ public TestForm ()
+ {
+ IsMdiContainer = true;
+
+ // Add an Mdi component
+ Form form = new Form ();
+ form.MdiParent = this;
+ form.Closing += delegate (object o, CancelEventArgs args) {
+MessageBox.Show ("CHILD Closing event"); };
+ form.Show ();
+ }
+
+ protected override void OnPaint (PaintEventArgs args)
+ {
+ base.OnPaint (args);
+ }
+}
+
+
+Actual Results:
+Nothing is printed to the console.
+
+Expected Results:
+In .Net 1.1/2.0 a messabe box appears, indicating that the Closing event of
+the mdi child has been called.
+
+Additional Information:
+Mono from trunk.
More information about the mono-bugs
mailing list