首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

NotifyIcon的气球提示为何第一次不显示而以后可以显示呢?该怎么处理

2012-04-21 
NotifyIcon的气球提示为何第一次不显示而以后可以显示呢?private void Form1_SizeChanged(object sender,

NotifyIcon的气球提示为何第一次不显示而以后可以显示呢?
private void Form1_SizeChanged(object sender, EventArgs e)
  {
  if (this.WindowState == FormWindowState.Minimized)
  {
  this.ShowInTaskbar = false;
  this.Hide();
  this.notifyIcon1.Visible = true;
  this.notifyIcon1.ShowBalloonTip(3000);
  }
  }

第一次窗口最小化,气球提示不显示,但是双击托盘图标显示窗口后再最小化以后都显示了,为什么呢?怎么玩解决?

[解决办法]
this.notifyIcon1.ShowBalloonTip(3000);
this.notifyIcon1.Visible = true;

换下顺序试试
[解决办法]

探讨

引用:
this.notifyIcon1.ShowBalloonTip(3000);
this.notifyIcon1.Visible = true;

换下顺序试试


按照您的换下顺序更糟了,原来的顺序除了第一次不显示,以后的每次最小化都显示,换了顺序,以后每次最小化都不一定显示了,但是有时候显示
奇怪

[解决办法]
this.Hide();
this.notifyIcon1.Visible = true;
this.notifyIcon1.ShowBalloonTip(3000);
=>
this.notifyIcon1.Visible = true;
this.notifyIcon1.ShowBalloonTip(3000);
this.Hide();

[解决办法]
就是ico是在这个最小化之后才动态创建的,并且有一定的时间延时
----------------------------------------------------
你让它在第一次最小化之前创建。

热点排行