私はかなり単純な方法で NotifyIcon を使用します。
public class Popup
{
...
private static NotifyIcon ni;
static Popup()
{
ni = new NotifyIcon();
ni.Icon = SystemIcons.Information;
}
public Popup(string nexusKey)
{
...
}
public void make(string text)
{
try
{
...
}
catch
{
ni.Visible = true;
ni.ShowBalloonTip(1000, "Thats the title", text, ToolTipIcon.Info);
}
}
}
問題は、バルーンを表示するプロセスをホストしているウィンドウとは異なるウィンドウにフォーカスしている場合、「生きている」タイマーが開始されないように見えることです。何があっても1秒後に風船が消えるようにする方法についてのアイデアはありますか?