开发者

Windowsless application, threads and Invoke()

Let's suppose I have windowsless application: only NotifyIcon is presented. So I've created the only NotifyIcon that I need. But when I had a Form开发者_C百科1 class I could use form1.Invoke(action) to perform actions from another thread. And what should I do now?

UPD: this is an answer: we should Invoke() a menu itself

if (mnuTrayMenu.InvokeRequired)
  mnuTrayMenu.Invoke(action);
else
  action();


As I mentioned in my question, I've solved this with:

    if (mnuTrayMenu.InvokeRequired)
        mnuTrayMenu.Invoke(action);
    else
        action();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜