NotifyIcon导致窗体在关闭时挂起

编程入门 行业动态 更新时间:2024-10-27 13:30:07
本文介绍了NotifyIcon导致窗体在关闭时挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在主应用程序窗体的Load方法中,我有一个NotifyIcon对象,该对象被设置为图标.此图标已嵌入我的资源文件中.我遇到的问题是,当我关闭主窗体时,应用程序在消失之前会挂起3或4秒钟.我将其范围缩小到以下代码行:

In my main application form's Load method I have a NotifyIcon object that is being set to an icon. This icon is embedded within my resource file. The problem I am having is that when I'm closing the main form the application hangs for a good 3 or 4 seconds before dissapearing. I've narrowed it down to this line of code:

notifyIcon.Icon = Properties.Resources.Dictionary2;
notifyIcon.Icon = Properties.Resources.Dictionary2; 
推荐答案

ArtVandelez, 应该说您的代码没有错误, notifyIcon.Icon = Properties.Resources.Dictionary2; 那么,您介意提供更多示例代码或其他信息吗?谢谢! 最好的问候, Guo Hi ArtVandelez,It should be to say that there is no error in your code,notifyIcon.Icon = Properties.Resources.Dictionary2;So, would you mind providing more sample code or other information? Thank you!Best regards,Guo

更多推荐

NotifyIcon导致窗体在关闭时挂起

本文发布于:2023-11-11 16:58:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579032.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:窗体   挂起   NotifyIcon

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!