我在Windows 10操作系统中创建了程序但是我的第二台运行Windows 7的计算机上没有显示通知图标。以下是通知图标的代码:
notifyIcon1.Icon = SystemIcons.Exclamation;
notifyIcon1.BalloonTipTitle = "Licenca";
notifyIcon1.BalloonTipIcon = ToolTipIcon.Warning;
notifyIcon1.BalloonTipText = "Some text.";
notifyIcon1.ShowBalloonTip(3000);
notifyIcon1.Dispose();
答案 0 :(得分:1)
notifyIcon1.Dispose()
会破坏图标,因此会立即消失。你应该删除这一行。此外,请确保将notifyIcon1.Visible
设置为true,否则图标将永远不会显示。