[Mono-bugs] [Bug 80604][Maj] New - Form.Visible should return true during OnLoad

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jan 24 12:41:53 EST 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 georgegiolfan at yahoo.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80604

--- shadow/80604	2007-01-24 12:41:53.000000000 -0500
+++ shadow/80604.tmp.25873	2007-01-24 12:41:53.000000000 -0500
@@ -0,0 +1,43 @@
+Bug#: 80604
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: georgegiolfan at yahoo.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Form.Visible should return true during OnLoad
+
+Description of Problem:
+The Visible property of a Form returns false when called from the OnLoad 
+method.
+
+Steps to reproduce the problem:
+Compile and run the following program.
+using System;
+using System.Diagnostics;
+using System.Windows.Forms;
+class TestForm : Form {
+    static void Main() {
+        Application.Run(new TestForm());
+    }
+    protected override void OnLoad(EventArgs e) {
+        base.OnLoad(e);
+        Debug.Assert(Visible);
+    }
+}
+
+How often does this happen? 
+Always (on the SVN version).
+
+Additional Information:
+I think the problem is in Control.SetVisibleCore. is_visible should be set 
+before calling CreateControl.


More information about the mono-bugs mailing list