[Mono-bugs] [Bug 81904][Nor] Changed - .Activate() or .BringToFront() don't work

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jun 19 16:25:45 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 nowayx at gmail.com.


--- shadow/81904	2007-06-19 15:49:18.000000000 -0400
+++ shadow/81904.tmp.21303	2007-06-19 16:25:45.000000000 -0400
@@ -1,12 +1,12 @@
 Bug#: 81904
 Product: Mono: Class Libraries
 Version: 1.2
 OS: unknown
-OS Details: 
-Status: NEEDINFO   
+OS Details: Linux (debian and kde) and Windows
+Status: REOPENED   
 Severity: Unknown
 Priority: Normal
 Component: Windows.Forms
 AssignedTo: toshok at ximian.com                            
 ReportedBy: nowayx at gmail.com               
@@ -48,6 +48,39 @@
 Alex, can you try that repro and confirm that it allows you to 
 reproduce the problem on your system ?
 Can you also add the following info to the bug report:
 * Mono version
 * OS/Platform
+------- Additional Comments From nowayx at gmail.com  2007-06-19 16:25 -------
+Ok, I can't test it on Linux right now.
+But on Windows your code still has a problem.
+But maybe I wasn't clear enough (sorry!)
+The BringToFront works just fine if you call it outside the Click
+event in the notifyIcon. Try it and you will see.
+.Active() didn't work from your example (but the BringToFront worked).
+Add the following lines in your example:
+	void MainForm_Load (object sender, EventArgs e)
+	{
+		_notifyIcon.Icon = Icon;
+		_notifyIcon.Visible = true;
+		_notifyIcon.Click += new EventHandler(testClick);
+	}
+        private void testClick(object sender, EventArgs e)
+        {
+                Console.WriteLine("Is here!!!!");
+		BringToFront(); 
+        }
+If you click the notifyIcon you will see that neither BringToFront or
+Active work. But for some weird reason, when you call BringToFront
+from a different event it works.
+Alex A. dos Santos

More information about the mono-bugs mailing list