Tim*_*ell 1 c# winapi windows-xp winforms
有没有办法在发生崩溃时自动删除NotifyIcon?(我知道你可以用鼠标移除它)
我正在运行Windows XP.
对于C#,尝试从AppDomain处理UnhandledException事件,因此,在您的Main()方法中添加:
AppDomain.CurrentDomain.UnhandledException +=
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Run Code Online (Sandbox Code Playgroud)
然后添加以下方法:
static void CurrentDomain_UnhandledException(object sender,
UnhandledExceptionEventArgs e)
{
// .... Remove Notification icon here
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
837 次 |
| 最近记录: |