实现气泡提示窗口

sure356 2010-09-05 08:05:42
我在winform里面加了一个button,一个tiptool,和一个notifyIcon,
将tiptool的isballoon属性设置为True,然后在button的clickfcn里面写了如下:

this.notifyIcon1.Visible = true;
this.notifyIcon1.ShowBalloonTip(1000, "标题","内容", ToolTipIcon.Error);


可是,为什么点了button,却一直看不见气泡提示窗口呢?难道我的写法错了?
...全文
259 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lz00728 2010-09-05
  • 打赏
  • 举报
回复
不知道怎么做,现在学习
wuyq11 2010-09-05
  • 打赏
  • 举报
回复
private void button1_Click(object sender, EventArgs e)
{
notifyIcon.ShowBalloonTip(3000, "提示","这是气球提示!", ToolTipIcon.Info);
}
http://www.codeproject.com/KB/shell/balloontipsarticle.aspx
q107770540 2010-09-05
  • 打赏
  • 举报
回复

private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
this.notifyIcon1.Visible = true;
this.ShowInTaskbar = false;
e.Cancel = true;

this.Hide();
notifyIcon1.Text = "ABC" + "\r\n";
notifyIcon1.BalloonTipTitle = "ABC系统";
notifyIcon1.BalloonTipText = "程序最小化,仍继续运行......" + "\r\n" + "双击托盘图标还原窗口.";
notifyIcon1.ShowBalloonTip(1000);//消失时间
}
}



参考:http://topic.csdn.net/u/20100122/10/c382374b-bab6-43a6-b7d8-6a564fe56b78.html

110,578

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧