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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=81668 --- shadow/81668 2007-05-18 07:30:12.000000000 -0400 +++ shadow/81668.tmp.16591 2007-05-18 07:30:12.000000000 -0400 @@ -0,0 +1,51 @@ +Bug#: 81668 +Product: Mono: Class Libraries +Version: 1.2 +OS: +OS Details: XP SP2 +Status: NEW +Resolution: +Severity: +Priority: Minor +Component: Windows.Forms +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Properties on NotifyIcon are ordering sensitive + +If the Visible property is set before the Icon property is set then the +icon is _not_ drawn in the system tray. + +Mono 1.2.4 (installer). Tested only on Windows XP SP2, where it always +occurs. + +Code like the following works and the icon appears in the system tray. + m_notifyIcon = new NotifyIcon(); + m_notifyIcon.Text = "notifyIcon1"; + m_notifyIcon.Icon = ico; + m_notifyIcon.Visible = true; + +However with code like the following where one sets Visible before +setting the Icon property then the icon is not displayed. + m_notifyIcon = new NotifyIcon(); + m_notifyIcon.Text = "notifyIcon1"; + m_notifyIcon.Visible = true; + m_notifyIcon.Icon = ico; + +See bug 81667--"Crash from NotifyIcon.HideSystray on Form exit if not +fully configured", where repro code is attached. Call the application +there with a path to an icon filename on the command-line. As it stands +the icon is not displayed. Move the "m_notifyIcon.Visible = true;" to +the end and the icon does then appears. + +Either ordering works on MSFT CLR v2. + + +In is not valid for the user have to know what ordering of properties is +required. See the Framework Design Guidelines e.g at +http://msdn2.microsoft.com/en-us/library/ms229006(VS.80).aspx: + DO allow properties to be set in any order even if this results in a +temporary invalid object state. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
