惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - cncxz(虫虫)

在.NET环境下为网站增加IP过滤功能 推荐几个基于.net的cms系统 超赞的10个Windows Live Writer插件 发布ASP.NET应用程序时的10个好习惯(转) 一个基于web的pdf浏览器 ajax跨域访问代理文件下载(asp、php、asp.net) jQuery UI 1.0 已于2007-9-16日正式发布 Visual Studio插件大搜索(60+) 推荐一批基于web的开源html文本编辑器(40+) 终结IE6下背景图片闪烁问题 一个web应用程序统计在线用户列表的东东(带c#源码) 中了网络流氓www.e-jok.cn的招 使用 javascript 标记高亮关键词 Div+Css酷站一箩筐 在win2k3上使用卡巴斯基6.0 发布控件Express.NET.WindowsForms运行时的本地化补丁 创建为ClickOnce清单签名的.pfx格式数字证书 Windows Live Messenger去广告补丁 一个阴历阳历互相转化的类(c#源码)
小发现:sql2005中的异常处理消息框可以直接使用
cncxz(虫虫) · 2006-10-12 · via 博客园 - cncxz(虫虫)

使用了一段时间的SQL2005之后,发现里面的异常处理消息框(ExceptionMessageBox)功能很不错。

可以关联相应帮助,复制到剪贴板或者是查看详细的技术信息

分析了一下相关文件,发现这个功能包含在C:\Program Files\Microsoft SQL Server\90\Shared目录下的Microsoft.NetEnterpriseServers.ExceptionMessageBox.dll中,可以在.net工程中直接引用,调用示例如下:

示例1
            try
            {
                string[] aa = new string[1];
                aa[1] = "数组越界哈";
            }
            catch (Exception ex)
            {
                ExceptionMessageBox box1 = new ExceptionMessageBox(ex);
                box1.Show(this);
            }

示例2
            ExceptionMessageBox box1 = new ExceptionMessageBox("一个简单的问题,你确认执行操作么?");
            box1.Symbol = ExceptionMessageBoxSymbol.Question;
            box1.Buttons = ExceptionMessageBoxButtons.YesNo;
            box1.Caption = "问一下啊";
            DialogResult dr = box1.Show(this);
            string msg = string.Empty;
            switch (dr)
            {
                case DialogResult.Yes:
                    msg = "你选择了【是】";
                    break;
                case DialogResult.No:
                    msg = "你选择了【否】";
                    break;
            }
            MessageBox.Show(msg);

另外,还应该把C:\Program Files\Microsoft SQL Server\90\Shared\zh-CHS下的Microsoft.NetEnterpriseServers.ExceptionMessageBox.resources.dll拷出来,这个是相应简体中文资源

相关dll和使用效果演示下载地址如下
https://files.cnblogs.com/cncxz/sqlBox.rar

posted on 2006-10-12 22:34  cncxz(虫虫)  阅读(744)  评论()    收藏  举报