[Mono-bugs] [Bug 82633][Wis] New - TopMost window flag different behaviour

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 30 10:56:12 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 tquerci at gmail.com.

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

--- shadow/82633	2007-08-30 10:56:12.000000000 -0400
+++ shadow/82633.tmp.16781	2007-08-30 10:56:12.000000000 -0400
@@ -0,0 +1,205 @@
+Bug#: 82633
+Product: Mono: Class Libraries
+Version: 1.1
+OS: Windows XP
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: tquerci at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: TopMost window flag different behaviour
+
+If one message box is open up a TopMost window there is a different
+behaviour between Linux and Windows. Under linux the message is open on the
+"TopMost" windows but under Window the MessageBox is open UNDER the
+"TopMost" windows.
+I try to run the same application using MS VM and the correct behaviour is
+like Linux platform.
+
+Here there is a sample code to show this bug.
+------------------------------------------------------------------------
+//
+/home/torello/mono_project/sw_verifiche/sw_verifiche/sw_verifiche/main_form.cs
+created with MonoDevelop
+
+// User: torello at 16:19 01/08/2007
+
+//
+
+// To change standard headers go to Edit->Preferences->Coding->Standard Headers
+
+//
+
+
+
+using System;
+
+using System.Drawing;
+
+using System.Windows.Forms;
+
+
+
+namespace sw_verifiche
+
+{
+
+	
+
+	public class FormMain : System.Windows.Forms.Form
+
+	{
+
+
+
+
+
+        private System.Windows.Forms.Panel panel1;
+
+ 		
+
+		public FormMain()
+
+		{			
+
+			this.panel1 = new System.Windows.Forms.Panel();
+
+			this.panel1.SuspendLayout();
+
+
+			this.SuspendLayout();
+
+
+			System.Windows.Forms.Button buttonOk;
+
+			System.Windows.Forms.Button buttonCancel;
+
+
+			buttonOk = new Button();
+
+			buttonOk.Text="Do not nothing";
+
+			buttonOk.Location = new Point(562,636);
+
+			buttonOk.Size =  new System.Drawing.Size(164, 50);
+
+			buttonOk.Font = new System.Drawing.Font("Arial", 15.75F,
+System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
+((System.Byte)(0)));
+
+			buttonOk.BackColor = System.Drawing.Color.Transparent;
+
+			
+
+
+			buttonCancel = new Button();
+
+			buttonCancel.Text = "Click Here";
+
+			buttonCancel.Location = new Point(302,636);
+
+			buttonCancel.Size =  new System.Drawing.Size(164, 50);
+
+			buttonCancel.Font = new System.Drawing.Font("Arial", 15.75F,
+System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
+((System.Byte)(0)));
+
+			buttonCancel.BackColor = System.Drawing.Color.Transparent;
+
+			
+
+			buttonCancel.Click += new System.EventHandler(quitHandler);
+
+			
+
+			this.panel1.Controls.Add(buttonOk);
+
+			this.panel1.Controls.Add(buttonCancel);
+
+
+
+			Rectangle wa=System.Windows.Forms.Screen.PrimaryScreen.Bounds;
+
+			this.panel1.Location = new System.Drawing.Point((wa.Width-1024)/2,
+(wa.Height-768)/2);
+
+			this.panel1.BorderStyle=System.Windows.Forms.BorderStyle.None;
+
+			
+
+			this.panel1.Name = "panel1";
+
+			this.panel1.Size = new System.Drawing.Size(1024,768);
+
+
+			this.ControlBox=false;
+
+			this.MinimizeBox=false;
+
+			this.MaximizeBox=false;
+
+
+			this.Controls.Add(this.panel1);
+
+			this.Name = "Form1";
+
+			this.Text = "Form1";
+
+
+
+			this.TopMost=true;
+
+			this.StartPosition=System.Windows.Forms.FormStartPosition.CenterScreen;
+
+			this.Bounds = System.Windows.Forms.Screen.PrimaryScreen.Bounds;
+
+			this.FormBorderStyle=System.Windows.Forms.FormBorderStyle.None;
+
+
+
+			this.BackColor=System.Drawing.Color.FromArgb(13, 78, 115);
+
+			this.panel1.BackColor=System.Drawing.Color.FromName("Control");
+
+
+			this.ResumeLayout(false);
+
+		}	
+
+		
+
+		public void quitHandler(object o, EventArgs a) {
+
+			DialogResult res = MessageBox.Show("Do you see this
+dialog?","Attention!!!",MessageBoxButtons.YesNo);
+
+			if (res==System.Windows.Forms.DialogResult.Yes) {
+
+				this.Hide();
+
+				Application.Exit();
+
+			}
+
+		}
+
+		
+
+		public static void Main(string[] args) {
+
+			Application.Run(new FormMain());
+
+		}
+
+
+
+	}
+
+}


More information about the mono-bugs mailing list