Typically, user interface controls should only be used in the user interface thread. If you want to use a user interface object from any other thread, you usually need to call Control.Invoke. NotifyIcondoes not have such a method.
What is the right way to do something with NotifyIconfrom a background thread?
For example, the following law? What is the legal alternative?
Task.Run(() => { notifyIcon.Visible = true; });
source
share