程式界面:
效果:在win右下角跳出提示訊息
先加入個NotifyIcon控制項,程式如下:
private void button1_Click(object sender, EventArgs e)
{
this.notifyIcon1.Visible = true; //啟用notifyicon
this.notifyIcon1.ShowBalloonTip(1000, "標題", "123123123", ToolTipIcon.Error);
}
private void button2_Click(object sender, EventArgs e)
{
this.notifyIcon1.Visible = false; //停止notifyicon
}
沒有留言:
張貼留言