[Mono-bugs] [Bug 438866] New: MinimumSize and MaximumSize of System.Windows.Forms. Form may be in conflict

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 24 14:38:22 EDT 2008


           Summary: MinimumSize and MaximumSize of System.Windows.Forms.Form
                    may be in conflict
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: aypetrov at yandex.ru
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=247923)
 --> (https://bugzilla.novell.com/attachment.cgi?id=247923)
Sample code demonstrating the problem

MinimumSize and MaximumSize of System.Windows.Forms.Form may be in conflict in
Mono but not in original dotNet.

This code generates an exception if runs under Mono:

      MinimumSize = new Size(640, 480);
      MaximumSize = new Size(320, 240);

      if ((MaximumSize.Width < MinimumSize.Width) || (MaximumSize.Height <
        throw new Exception("MinimumSize and MaximumSize are in conflict. This
is impossible in original .Net");

In the dotNet the latest operation has priority. 
That means MinimumSize or MaximumSize must be adjusted (if necessary) right
after another parameter has been just set.

Sample code is attached. Compilation: 
mcs -r:System.Drawing,System.Windows.Forms MyForm.cs

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list