null exception in TrayIcon.set_Icon

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everybody,

I have an application that minimizes to a NotifyIcon.

Occationally I get this error:

System.NullReferenceException: Object reference not set to an instance of an
object.
at System.Windows.Forms.NotifyIcon.UpdateIcon(Boolean showIconInTray)
at System.Windows.Forms.NotifyIcon.set_Icon(Icon value)

Does anybody know why this might happen?
I've run some tests & the NotifyIcon does NOT throws an exception is the
Icon property is set to null, so that's not the problem.

Thanks
Nadav
 
Hi Nadav,

Thanks for your post.

I am not sure I understand your last paragraph very well. Can you give it a
more clear explanation?

For your issue, can you provide the full stack for this exception? When you
are doing what operation does the exception generate? If you create a
little sample application, does this problem still exist?

I look forward to hearing from you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top