[Mono-bugs] [Bug 81969][Nor] New - ObjectDisposedException closing form in Load event
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jun 28 15:20:07 EDT 2007
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 gert.driesen at pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=81969
--- shadow/81969 2007-06-28 15:20:07.000000000 -0400
+++ shadow/81969.tmp.26665 2007-06-28 15:20:07.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 81969
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com
+ReportedBy: gert.driesen at pandora.be
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ObjectDisposedException closing form in Load event
+
+When a form with StartPosition set to CenterScreen or CenterParent is
+closed in it's Load event, then an ObjectDisposedException is thrown.
+
+To reproduce, compile and run this code snippet:
+
+using System;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+ public MainForm ()
+ {
+ Load += new EventHandler (MainForm_Load);
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ MainForm form = new MainForm ();
+ form.StartPosition = FormStartPosition.CenterParent;
+ Application.Run (form);
+
+ form = new MainForm ();
+ form.StartPosition = FormStartPosition.CenterScreen;
+ Application.Run (form);
+
+ form = new MainForm ();
+ form.StartPosition = FormStartPosition.Manual;
+ Application.Run (form);
+
+ form = new MainForm ();
+ form.StartPosition = FormStartPosition.WindowsDefaultBounds;
+ Application.Run (form);
+
+ form = new MainForm ();
+ form.StartPosition = FormStartPosition.WindowsDefaultLocation;
+ Application.Run (form);
+ }
+
+ void MainForm_Load (object sender, EventArgs e)
+ {
+ Close ();
+ }
+}
More information about the mono-bugs
mailing list