看一下这个:
http://www.codeproject.com/KB/WPF/WPF_TaskbarNotifier.aspx
或者
www.codeproject.com/KB/WPF/wpf_notifyicon.aspx
其他选项是制作自己的通知表单气球,然后您将收到带有花朵背景和粉红色边框的通知 :) 顺便说一句:它也可以具有一些功能。
如本例所示:
http://i.stack.imgur.com/QtA0Y.jpg
<< 图片示例
根据需要创建一个表单,区域、控件等 :) 并编写如下代码:
void notifyIcon_MouseMove(object sender, MouseEventArgs e)
{
if (!this.Visible)
{
ShowPopup();
}
}
Timer t = new Timer();
private void ShowPopup()
{
Rectangle rect = Screen.GetWorkingArea(new Point(Screen.PrimaryScreen.Bounds.Right, Screen.PrimaryScreen.Bounds.Bottom));
this.Top = rect.Bottom - this.Height;
this.Left = rect.Right - this.Width;
this.Visible = true;
t.Interval = 4000;
t.Tick += new EventHandler(t_Tick);
t.Start();
}
void t_Tick(object sender, EventArgs e)
{
t.Stop();
Visible = false;
}
private void Form1_Click(object sender, EventArgs e)
{
this.Visible = false;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
notifyIcon.Visible = false;
notifyIcon.Dispose();
}
顺便说一句,它们看起来都一样,具有不同的图标大小,第一个可以放在右边,而所有其他的都对齐到左边......轻微的阴影变化等:)