vb.net 里面有两种messagebox,一种是vb语言提供的msgbox,另一种是.net framework 提供的messagebox.在此统一使用messagebox.

Warning,提示警示信息:

MessageBox.Show("You are not allowed to enquiry!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)

Error, 提示错误信息:

处理出错,或者出现异常的时候

MessageBox.Show(objEx.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

Information,显示消息:

MessageBox.Show("Created successfully.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information)

Alert, 询问信息:

Dim objResponse As MsgBoxResult
objResponse = MessageBox.Show(

"No record found!" & vbCrLf & "Do you want to create new record?",

"Alert",

MessageBoxButtons.OKCancel,

MessageBoxIcon.Exclamation)
If objResponse = MsgBoxResult.Ok Then
       btnCreate.Enabled = True
End If

winform messagebox 统一的更多相关文章

  1. WinForm MessageBox 提示对话框

    public class MessageUtil { /// <summary> /// 显示一般的提示信息 /// </summary> /// <param name ...

  2. winform messagebox自动关闭

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  3. C# WinForm MessageBox弹窗倒计时的自动关闭

    [DllImport("user32.dll", EntryPoint = "FindWindow")]        private static exter ...

  4. winform messageBox.Show()

    MessageBox.Show(" 5 个参数...... ",     " 亮仔提示",     MessageBoxButtons.OKCancel,    ...

  5. C# WinForm MessageBox.Show显示在窗体中间

    一.新建MessageBoxEx类,并添加以下代码. using System; using System.Windows.Forms; using System.Text; using System ...

  6. Revit Family API 添加对齐

    没测试成功,留待以后研究. [TransactionAttribute(Autodesk.Revit.Attributes.TransactionMode.Manual)] ; ; i < nV ...

  7. Revit Family API 添加几何实体

    先创建一个封闭曲线createProfileLShape();再创建实体,这里需要手工画一个参考平面; ; i < nVerts; ++i)        {            Line l ...

  8. Revit Family API 添加类型

    FamilyManager.NewType("");添加新类型,然后设置参数,就是为新类型设置参数. [TransactionAttribute(Autodesk.Revit.At ...

  9. Revit Family API 添加参数与尺寸标注

    使用FamilyManager其他的与普通添加参数与标注没区别. [TransactionAttribute(Autodesk.Revit.Attributes.TransactionMode.Man ...

随机推荐

  1. springboot的相关信息

    Maven的配置:zzp_settings.xml <?xml version="1.0" encoding="UTF-8"?> <setti ...

  2. WebDriver API 实例详解(三)

    二十一.模拟鼠标右键事件 被测试网页的网址: http://www.sogou.com Java语言版本的API实例代码: package test; import org.testng.annota ...

  3. 常用linux shell脚本记录

    遍历目录下所有的文件是目录还是文件 for file in ./* do if test -f $file then echo $file 是文件 fi if test -d $file then e ...

  4. 手把手教你学node.js之使用 superagent 与 cheerio 完成简单爬虫

    使用 superagent 与 cheerio 完成简单爬虫 目标 建立一个 lesson 3 项目,在其中编写代码. 当在浏览器中访问 http://localhost:3000/ 时,输出 CNo ...

  5. Linux 安装配置 Nginx

    前言 准备用flask做一个自己的博客网站,打算用Nginx来部署,所以在阿里云的服务器上安装Nginx,参考了很多教程,现在将步骤以及自己遇到的坑写下来,希望能对别人有所帮助. 我用的服务器是阿里云 ...

  6. Bootstrap table后端分页(ssm版)

    说明bootstrap table可以前端分页,也可以后端sql用limit分页.这里讲的是后端分页,即实用limit.性能较好,一般均用这种源码下载地址:https://git.oschina.ne ...

  7. CentOS7 忘了root密码怎么办

    今天打开很久没开机的另2台虚拟机,发现不记得root密码了. 于是参考了google搜索到的第一个答案,https://www.unixmen.com/reset-root-password-cent ...

  8. oracle_多字段统计(多count)

    oracle_多字段统计 查询同一张表中同一字段的不同值的综合,方法如下: select o.code 礼品代码, o.name 礼品名称, l.couponactivityid 券活动定义, cou ...

  9. img = img1*mask + img2*(1-mask) How do that ?

    原文地址:http://answers.opencv.org/question/160599/img-img1mask-img21-mask-how-do-that/ 如何提高一个简单操作的速度?最后 ...

  10. postgresql常用操作

    需要安装的软件包: apt-get install postgresql postgresql-client-9.1 postgresql-common postgresql-9.1 postgres ...