处理一个点击了与任务栏图标的ShowBalloonTip显示气球提示() [英] Handling a click over a balloon tip displayed with TrayIcon's ShowBalloonTip()

查看:865
本文介绍了处理一个点击了与任务栏图标的ShowBalloonTip显示气球提示()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用任务栏图标类的<​​code> ShowBalloonTip 方法来显示一个气球提示。有没有一种方法来处理点击了这个气球?

I use the ShowBalloonTip method of a TrayIcon class to display a balloon tip. Is there a way to handle a click over this balloon?

当我点击了气球,任何情况下,似乎产生的,它只是关闭气球。

When I click over the balloon, no event seem to be generated, and it only closes the balloon.

推荐答案

我想你的意思的 NotifyIcon的。使用以下模式...

I think you mean NotifyIcon . Use following pattern...

NotifyIcon notifyIcon = null;
public Form1()
{
    InitializeComponent();
    notifyIcon = new NotifyIcon();
    // Initializing notifyIcon here...
    notifyIcon.BalloonTipClicked += new EventHandler(notifyIcon_BalloonTipClicked);
}

void notifyIcon_BalloonTipClicked(object sender, EventArgs e)
{
    // Operation you want...
}

我希望它养活你的需要......

I hope it feed your needs...

这篇关于处理一个点击了与任务栏图标的ShowBalloonTip显示气球提示()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆