标签: multithreading winforms notifyicon
通常,UI控件必须仅在UI线程上使用。如果要使用来自任何其他线程的UI对象,通常必须调用Control.Invoke。 NotifyIcon没有这样的方法。
Control.Invoke
NotifyIcon
从后台线程使用NotifyIcon做某事的正确方法是什么?
例如,以下是否合法?什么是法律选择?
Task.Run(() => { notifyIcon.Visible = true; });