2

In a chat messenger application,i need to indicate the presence of new message by notify icon balloon tool tip.the presence of new message will produce a highlight in the corresponding taskbar item by producing a flash(if the window is in minimized state).so i implement it and execute.the code is given below.

this.nfiClient.Icon = Resource1.chat;

nfiClient.ShowBalloonTip(2000, "New message received..!", "" + msg.senderDisplayName + " messaged you.", ToolTipIcon.Info);

if (this.WindowState == FormWindowState.Minimized)
   {

     this.WindowState = FormWindowState.Minimized;

     FlashWindow.Flash(this,3);

   }

now i wished to see the window in normal state while click on the balloon tip(if the window is in minimized state).can i set it in any event property of the notify icon?please help me..

4

1 回答 1

1

BalloonTipClicked单击气球提示时会触发该事件。您必须将事件处理程序与此事件绑定:

nfiClient.BalloonTipClicked += new EventHandler(nfiClient_BalloonTipClicked);

private void nfiClient_BalloonTipClicked(object sender, EventArgs e)
{
    // Handle the click event here by showing the window.
}

要取消绑定事件处理程序,您可以使用

nfiClient.BalloonTipClicked -= new EventHandler(nfiClient_BalloonTipClicked);
于 2013-02-19T07:27:59.127 回答