[Mono-bugs] [Bug 80574][Nor] Changed - Setting FormBorderStyle
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jan 22 20:03:21 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=80574
--- shadow/80574 2007-01-22 18:33:12.000000000 -0500
+++ shadow/80574.tmp.21171 2007-01-22 20:03:21.000000000 -0500
@@ -1,23 +1,23 @@
Bug#: 80574
Product: Mono: Class Libraries
Version: 1.2
OS: Windows XP
OS Details:
-Status: RESOLVED
-Resolution: FIXED
+Status: REOPENED
+Resolution:
Severity: Unknown
Priority: Normal
Component: Windows.Forms
AssignedTo: monkey at jpobst.com
ReportedBy: georgegiolfan at yahoo.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: Setting FormBorderStyle should not change Bounds
+Summary: Setting FormBorderStyle
Description of Problem:
It seems that setting FormBorderStyle causes a Form to change Bounds.
Steps to reproduce the problem:
Compile and run the following program.
@@ -60,6 +60,54 @@
------- Additional Comments From monkey at jpobst.com 2007-01-22 18:33 -------
Why, the behavior is completely different depending on whether the
Form is visible or not! Of course! Fixed this version of the
behavior: the "not visible yet" case.
Fixed in r71480.
+
+------- Additional Comments From georgegiolfan at yahoo.com 2007-01-22 20:03 -------
+If that is the case (FormBorderStyle depending on Visible), then it
+doesn't work yet when the form is visible. However, I don't think it
+works that way. You may actually be quite close with "not visible
+yet". I would really like to see bug 80020 fixed.
+See this example:
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+class TestForm : Form {
+ static void Main() {
+ new TestForm();
+ }
+ public TestForm() {
+ // This works now.
+ Rectangle BoundsBeforeBorderStyleChange = Bounds;
+ Rectangle ClientRectangleBeforeBorderStyleChange =
+ClientRectangle;
+ FormBorderStyle = FormBorderStyle.None;
+ Debug.Assert(Bounds == BoundsBeforeBorderStyleChange);
+ Debug.Assert(ClientRectangle ==
+ClientRectangleBeforeBorderStyleChange);
+
+ //This should work.
+ Visible = true;
+ FormBorderStyle = FormBorderStyle.Sizable;
+ BoundsBeforeBorderStyleChange = Bounds;
+ ClientRectangleBeforeBorderStyleChange = ClientRectangle;
+ FormBorderStyle = FormBorderStyle.None;
+ Debug.Assert(Bounds != BoundsBeforeBorderStyleChange);
+ Debug.Assert(ClientRectangle ==
+ClientRectangleBeforeBorderStyleChange);
+
+ //This seems to show that the behavior is not strictly
+related to Visible.
+ Visible = false;
+ FormBorderStyle = FormBorderStyle.Sizable;
+ BoundsBeforeBorderStyleChange = Bounds;
+ ClientRectangleBeforeBorderStyleChange = ClientRectangle;
+ FormBorderStyle = FormBorderStyle.None;
+ Debug.Assert(Bounds != BoundsBeforeBorderStyleChange);
+ Debug.Assert(ClientRectangle ==
+ClientRectangleBeforeBorderStyleChange);
+ }
+}
+
+None of these assertions fail on Microsoft SWF.
More information about the mono-bugs
mailing list