[Mono-bugs] [Bug 82456][Min] New - Messag eBox focus issues #2

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 16 13:26:35 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 kuba.brecka at gmail.com.

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

--- shadow/82456	2007-08-16 13:26:35.000000000 -0400
+++ shadow/82456.tmp.24303	2007-08-16 13:26:35.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 82456
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Windows XP SP1
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Minor
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: kuba.brecka at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Messag  eBox focus issues #2
+
+Using Mono 1.2.4, using the following code you can reproduce a bug. I think
+it happens on Windows only, although I haven't tried it on other OS.
+
+1. Run the following code (on Windows)
+2. Press [SPACE] four times. The form won't get focused back after the
+second MessageBox returns. If you have any other application running, it
+will get focused instead.
+
+It seems that there is a "patch" for this problem, but instead of fixing
+the bug, it only returns focus to the form for the first time a MessageBox
+is invoked. After the second MessageBox returns, the focusing is incorrect.
+
+Code:
+
+using System;
+using System.Windows.Forms;
+
+namespace MonoTest34
+{
+    class Form1 : Form
+    {
+        static void Main()
+        {
+            Application.Run(new Form1());
+        }
+
+        public Form1()
+        {
+            Button B = new Button();
+            B.Click += new EventHandler(B_Click);
+            this.Controls.Add(B);
+        }
+
+        void B_Click(object sender, EventArgs e)
+        {
+            MessageBox.Show("Hello world");
+        }
+    }
+}


More information about the mono-bugs mailing list