Bug 319639 (MONO76823)

Summary: System Boxes cannot be suppressed
Product: [Mono] Mono: Class Libraries Reporter: Barry Bird <aviary.tree>
Component: Windows.FormsAssignee: Peter Dennis Bartok <peter>
Status: RESOLVED FIXED QA Contact: Mono Bugs <mono-bugs>
Severity: Enhancement    
Priority: P3 - Medium Keywords: UI
Version: 1.1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Thomas Wiest 2007-09-15 19:39:18 UTC


---- Reported by aviary.tree@ntlworld.com 2005-11-25 07:49:57 MST ----

Description of Problem:
Main Form: Maximisebox button = false is ignored.
Minimisebox button = false is ignored.
I couldn't see any bug report on this, which is surprising.  Has really
no-one else noticed this?

mono 1.1.10 on SUSE 10  KDE

Steps to reproduce the problem:
1. Compile and run the code below, which defines a simple Main Form with an
exit button, and sets the Maximise and Minimise Box properties to false.
2. The Minimise and Maximise boxes at the top right of the form are still
active, and they work if you click on them.


Actual Results:
Click on the maximise box and the form fills the screen, and reverts if you
click again,
Click on the minimise box and the form is hidden and re-appears if click on
 the icon in the taskbar.

Expected Results:
Click on where the maximise box should be should have no effect.
Click on where the minimise box should be should have no effect.

How often does this happen? 
Every time.

Additional Information:

Sample code (verify by visual inspection):

using System;
using System.Windows.Forms;

namespace listview1
{
	class MainForm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button btnDismiss;


		public MainForm()
		{
			InitializeComponent();

		}
		void InitializeComponent() {			
			this.btnDismiss = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// btnDismiss
			// 
			this.btnDismiss.Location = new System.Drawing.Point(104, 120);
			this.btnDismiss.Name = "btnDismiss";
			this.btnDismiss.Size = new System.Drawing.Size(72, 24);
			this.btnDismiss.TabIndex = 1;
			this.btnDismiss.Text = "Dismiss";
			this.btnDismiss.Click += new System.EventHandler(this.BtnDismissClick);
			// 
			// MainForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(292, 266);
			this.Controls.Add(this.btnDismiss);		
			this.MaximizeBox = false;  // **
			this.MinimizeBox = false;  // **
			this.Name = "BoxForm";
			this.Text = "Test Boxes";
			this.ResumeLayout(false);
		}
		[STAThread]
		public static void Main(string[] args)
		{
			Application.Run(new MainForm());
		}
		void BtnDismissClick(object sender, System.EventArgs e)
		{
			Application.Exit();
		}		
	}
}



---- Additional Comments From aviary.tree@ntlworld.com 2005-11-25 07:58:41 MST ----

Wondered if this was due to some interaction with the Window Manager,
so I tried again in Gnome.  No difference. The boxes still worked when
they shouldn't.



---- Additional Comments From peter@novonyx.com 2006-01-27 01:04:30 MST ----

Fixed in svn.


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>SUSE 10</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".