-------------------控件NotifyIcon-----------
//客户端调用
private void btnShowError_Click(object sender, EventArgs e)
{
string error = "程序出错";
BubbleHelper.Instance.SetBubbleTime(1000, error);
}
//提取的气泡提示帮助类
public class BubbleHelper
{
private static BubbleHelper instance;

public static BubbleHelper Instance
{
get
{
if (instance == null)
{
instance = new BubbleHelper();
}
return BubbleHelper.instance;
}
}

NotifyIcon notify = null;
public void SetBubbleTime(int millisecond, string error)
{
if (notify == null)
{
notify = new NotifyIcon();
}

this.notify.Visible = true;

string path = Application.StartupPath + "//error.ico";
this.notify.Icon = new Icon(path);
this.notify.ShowBalloonTip(millisecond, "异常提示", error, ToolTipIcon.Error);
}
}

 

NotifyIcon用法的更多相关文章

  1. C# WinForm中NotifyICon控件的用法

    参考:http://blog.csdn.net/paullink520/article/details/14170021 http://www.cnblogs.com/webman/archive/2 ...

  2. EditText 基本用法

    title: EditText 基本用法 tags: EditText,编辑框,输入框 --- EditText介绍: EditText 在开发中也是经常用到的控件,也是一个比较必要的组件,可以说它是 ...

  3. jquery插件的用法之cookie 插件

    一.使用cookie 插件 插件官方网站下载地址:http://plugins.jquery.com/cookie/ cookie 插件的用法比较简单,直接粘贴下面代码示例: //生成一个cookie ...

  4. Java中的Socket的用法

                                   Java中的Socket的用法 Java中的Socket分为普通的Socket和NioSocket. 普通Socket的用法 Java中的 ...

  5. [转载]C#中MessageBox.Show用法以及VB.NET中MsgBox用法

    一.C#中MessageBox.Show用法 MessageBox.Show (String) 显示具有指定文本的消息框. 由 .NET Compact Framework 支持. MessageBo ...

  6. python enumerate 用法

    A new built-in function, enumerate() , will make certain loops a bit clearer. enumerate(thing) , whe ...

  7. [转载]Jquery中$.get(),$.post(),$.ajax(),$.getJSON()的用法总结

    本文对Jquery中$.get(),$.post(),$.ajax(),$.getJSON()的用法进行了详细的总结,需要的朋友可以参考下,希望对大家有所帮助. 详细解读Jquery各Ajax函数: ...

  8. 【JavaScript】innerHTML、innerText和outerHTML的用法区别

    用法: <div id="test">   <span style="color:red">test1</span> tes ...

  9. chattr用法

    [root@localhost tmp]# umask 0022 一.chattr用法 1.创建空文件attrtest,然后删除,提示无法删除,因为有隐藏文件 [root@localhost tmp] ...

随机推荐

  1. Java--常用类

    1.方法中参数传递:值传递 基本数类型:具体的实际值 引用数据类型:对象的地址值 2.继承:关键字:extends单继承继承父类的非私有成员多重继承 2.权限的修饰符:private 只能在当前类的内 ...

  2. 98. Validate Binary Search Tree

    Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as ...

  3. 准备开始自己搞企业管理软件,从openerp入手

    公司运行了半年多,人还比较少,只用了一些即时通讯工具,还有svn等基本的工具 记账用的是gnucash 其他的管理急需相应的软件,找了很长时间也没有合适的 想了想,还是从开源的openerp odoo ...

  4. Android 客户端和服务器 json交互

    http://www.cnblogs.com/jyan/articles/2544974.html 1.JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式. ...

  5. leetcode 135. Candy ----- java

    There are N children standing in a line. Each child is assigned a rating value. You are giving candi ...

  6. Codeforces Round #124 (Div. 2)

    A. Plate Game 如果可以放置一个圆的情况下,先手将圆放置在矩形正中心,那么根据对称性,先手只要放后手的对称的位置即可,也就是先手必胜,否则后手胜. B. Limit 讨论\(n,m\)的大 ...

  7. hdu1078  记忆化搜索(DP+DFS)

    题意:一张n*n的格子表格,每个格子里有个数,每次能够水平或竖直走k个格子,允许上下左右走,每次走的格子上的数必须比上一个走的格子的数大,问最大的路径和. 我一开始的思路是,或许是普通的最大路径和,只 ...

  8. 恢复Ext3下被删除的文件(转)

    恢复Ext3下被删除的文件(转) 前言 下面是这个教程将教你如何在Ext3的文件系统中恢复被rm掉的文件. 删除文件 假设我们有一个文件名叫 ‘test.txt’ $ls -il test.txt 1 ...

  9. Cycles_per_instruction

    https://en.wikipedia.org/wiki/Cycles_per_instruction

  10. LVM磁盘管理

    http://www.cnblogs.com/gaojun/archive/2012/08/22/2650229.html Linux LVM硬盘管理及LVM扩容 LVM磁盘管理 一.LVM简介... ...