NotifyIcon用法
-------------------控件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用法的更多相关文章
- C# WinForm中NotifyICon控件的用法
参考:http://blog.csdn.net/paullink520/article/details/14170021 http://www.cnblogs.com/webman/archive/2 ...
- EditText 基本用法
title: EditText 基本用法 tags: EditText,编辑框,输入框 --- EditText介绍: EditText 在开发中也是经常用到的控件,也是一个比较必要的组件,可以说它是 ...
- jquery插件的用法之cookie 插件
一.使用cookie 插件 插件官方网站下载地址:http://plugins.jquery.com/cookie/ cookie 插件的用法比较简单,直接粘贴下面代码示例: //生成一个cookie ...
- Java中的Socket的用法
Java中的Socket的用法 Java中的Socket分为普通的Socket和NioSocket. 普通Socket的用法 Java中的 ...
- [转载]C#中MessageBox.Show用法以及VB.NET中MsgBox用法
一.C#中MessageBox.Show用法 MessageBox.Show (String) 显示具有指定文本的消息框. 由 .NET Compact Framework 支持. MessageBo ...
- python enumerate 用法
A new built-in function, enumerate() , will make certain loops a bit clearer. enumerate(thing) , whe ...
- [转载]Jquery中$.get(),$.post(),$.ajax(),$.getJSON()的用法总结
本文对Jquery中$.get(),$.post(),$.ajax(),$.getJSON()的用法进行了详细的总结,需要的朋友可以参考下,希望对大家有所帮助. 详细解读Jquery各Ajax函数: ...
- 【JavaScript】innerHTML、innerText和outerHTML的用法区别
用法: <div id="test"> <span style="color:red">test1</span> tes ...
- chattr用法
[root@localhost tmp]# umask 0022 一.chattr用法 1.创建空文件attrtest,然后删除,提示无法删除,因为有隐藏文件 [root@localhost tmp] ...
随机推荐
- 三步搞定ISO/GHO安装系统 - imsoft.cnblogs
高清互动安装系统附件:重装系统视频教程.7z
- iOS学习笔记---c语言学习第七天
结构体 结构体是一种自定义的数据类型 struct 结构体名 { 类型说明符 成员名: … 类型说明符 成员名: }: #import <Foundation/Foundation.h& ...
- Codeforces Round #113 (Div. 2)
Codeforces Round #113 (Div. 2) B. Polygons 题意 给一个\(N(N \le 10^5)\)个点的凸包 \(M(M \le 2 \cdot 10^4)\)次询问 ...
- HDU 1159 Common Subsequence
HDU 1159 题目大意:给定两个字符串,求他们的最长公共子序列的长度 解题思路:设字符串 a = "a0,a1,a2,a3...am-1"(长度为m), b = "b ...
- Mysql存储日期类型用int、timestamp还是datetime?
通常存储时间用datetime类型,现在很多系统也用int存储时间,它们有什么区别?个人更喜欢使用int这样对于日期计算时比较好哦,下面我们一起来看到底那种会好些. int ().4个字节存储,INT ...
- 【BZOJ1007】【HNOI2008】水平可见直线
依旧看黄学长代码,不过这回是看完后自己写的 原题: 在xoy直角坐标平面上有n条直线L1,L2,...Ln,若在y值为正无穷大处往下看,能见到Li的某个子线段,则称Li为可见的,否则Li为被覆盖的.例 ...
- C中scanf/gets/fgets的区别
功能:同样是获取字符串. 区别: scanf 遇到空格/回车/Tab键认为输入结束, 但是空格/回车/Tab键仍会留在输入的缓冲区中.常见的是使用getchar(),处理scanf的后事:如果想要清除 ...
- C++@冒号(:)和双冒号(::)的用法
转自:http://blog.csdn.net/zimingjushi/article/details/6549390 1.冒号(:)用法 (1)表示机构内位域的定义(即该变量占几个bit空间) ty ...
- java.util.concurrent Class ThreadPoolExecutor
http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html
- line-hieght与vertical-align的区别与联系
7.3 line-height 行高指的是文本行的基线间的距离,但是文本之间的空白距离不仅仅是行高决定的, 同时也受字号的影响. 7.3.1 语 法 line-height属性的具体定义列表如下: 语 ...