声明:IWin32Window owner   ,  HelpNavigator navigator ,    string keyword

上面的三个参数类型不是很了解。没有做讨论。

等以后了解多了,再做补充。。。

下面讨论的一些常用参数,在平时使用,已经绰绰有余了。。。

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

下面是详细的代码  。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 对话框_终极版
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(“  1  个参数www.111cn.net
);
}

private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show(“ 2 个参数。。 ”,
“亮仔提示”
);
}

private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show(“ 3 个参数。。。 ”,
” 亮仔提示”,
MessageBoxButtons.YesNoCancel
);
}

private void button4_Click(object sender, EventArgs e)
{
MessageBox.Show(“ 4 个参数。。。  “,
” 亮仔提示”,
MessageBoxButtons.OKCancel,
MessageBoxIcon.Warning
);
}

private void button5_Click(object sender, EventArgs e)
{
MessageBox.Show(“ 5 个参数。。 。  “,
” 亮仔提示”,
MessageBoxButtons.OKCancel,
MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2
);
}

private void button6_Click(object sender, EventArgs e)
{
MessageBox.Show(“ 6 个参数。。。  “,
” 亮仔提示”,
MessageBoxButtons.OKCancel,
MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2,
MessageBoxOptions.RtlReading      //ServiceNotification//.RightAlign   // 标题向右对齐。
);

}

private void button7_Click(object sender, EventArgs e)
{
MessageBox.Show(“ 7 个参数。。帮助菜单不可用。。。。。  “,
” 亮仔提示”,
MessageBoxButtons.OKCancel,
MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2,
MessageBoxOptions.RightAlign,
true   // 标题向右对齐。。。。。                                );

}

private void button8_Click(object sender, EventArgs e)
{
MessageBox.Show(“ 7 个参数。帮助菜单    可用。   “,
” 亮仔提示”,
MessageBoxButtons.OKCancel,
MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2,
MessageBoxOptions.RightAlign  ,   // 要使用默认风格,此处参数可设为 0
@”C:Documents and SettingsAdministrator桌面新建文本文档.txt”
);
}

}
}

更多详细内容请查看:http://www.111cn.net/net/160/56737.htm

C#中Messagebox.Show()常用参数用法详解的更多相关文章

  1. 教程-Delphi中Spcomm使用属性及用法详解

    Delphi中Spcomm使用属性及用法详解 Delphi是一种具有 功能强大.简便易用和代码执行速度快等优点的可视化快速应用开发工具,它在构架企业信息系统方面发挥着越来越重要的作用,许多程序员愿意选 ...

  2. DAX/PowerBI系列 - 查询参数用法详解(Query Parameter)

    PowerBI  - 查询参数用法详解(Query Parameter) 很多人都不知道查询参数用来干啥,下面总结一下日常项目中常用的几个查询参数的地方.(本人不太欢hardcode的东西) 使用查询 ...

  3. Delphi中TStringList类常用属性方法详解

    TStrings是一个抽象类,在实际开发中,是除了基本类型外,应用得最多的. 常规的用法大家都知道,现在来讨论它的一些高级的用法. 先把要讨论的几个属性列出来: 1.CommaText 2.Delim ...

  4. js数组中foEach和map的用法详解 jq中的$.each和$.map

    数组中foEach和map的用法详解 相同点: 1.都是循环遍历数组(仅仅是数组)中的每一项. 2.forEach() 和 map() 里面每一次执行匿名函数都支持3个参数:数组中的当前项value, ...

  5. Scala 深入浅出实战经典 第62讲:Scala中上下文界定内幕中的隐式参数实战详解

    王家林亲授<DT大数据梦工厂>大数据实战视频 Scala 深入浅出实战经典(1-87讲)完整视频.PPT.代码下载: 百度云盘:http://pan.baidu.com/s/1c0noOt ...

  6. centos中crontab(计时器)用法详解

    关于crontab: crontab命令常见于Unix和类Unix的操作系统之中,用于设置周期性被执行的指令.该命令从标准输入设备读取指令,并将其存放于“crontab”文件中,以供之后读取和执行.该 ...

  7. Apache中的Order Allow,Deny用法详解

    本文讲述了Apache中的Order Allow,Deny用法.分享给大家供大家参考,具体如下: Allow和Deny可以用于apache的conf文件或者.htaccess文件中(配合Directo ...

  8. logback 常用参数配置详解

    logback 常用配置详解(二) <appender> <appender>: <appender>是<configuration>的子节点,是负责写 ...

  9. shell中echo基础及高级用法详解-渐入佳境

    --作者:飞翔的小胖猪 --创建时间:2021年2月19日 1.1 基础用法 echo命令用来输出文本,在shell脚本中用来输出提示信息用的比较多. 单引号:原样输出所有的内容,不用转义就能输出特殊 ...

随机推荐

  1. [Angular2 Router] CanActivate Route Guard - An Example of An Asynchronous Route Guard

    In this tutorial we are going to learn how we can to configure an can activate route guard in the An ...

  2. [Express] Level 5: Route file

    Using a Router Instance Let's refactor app.js to use a Router object. Create a new router object and ...

  3. Cocos2d-x 3.1 内存管理机制

    Cocos2d-x使用的内存管理方式是引用计数.引用计数是一种非常有效的机制.通过给每个对象维护一个引用计数器,记录该对象当前被引用的次数.当对象添加一次引用时,计数器加1:而对象失去一次引用时.计数 ...

  4. python字符串操作(连接、比较、格式化等)(转)

    字符串连接 方法一: Python代码 >>> str1 = 'hello' >>> str2 = 'world' >>> str1_2 = st ...

  5. Errors running builder "Integrated External Tool Builder" on project

    Errors during build.Errors running builder "Integrated External Tool Builder" on project p ...

  6. QWT6.0.1+win7下安装说明

    A) 简介 1.QWT是一个基于LGPL版权协议的开源项目, 可生成各种统计图.它为具有技术专业背景的程序提供GUI组件和一组实用类,其目标是以基于2D方式的窗体部件来显示数据, 数据源以数值,数组或 ...

  7. Golang学习 - fmt 包

    ------------------------------------------------------------ // Print 将参数列表 a 中的各个参数转换为字符串并写入到标准输出中. ...

  8. 10 ways to be a faster code reviewer--reference

    reference:http://blog.codacy.com/top-10-faster-code-reviews/ This is a blog post of our Code Reading ...

  9. Jquery zTree结合Asp.net实现异步加载数据

    zTree结合Asp.net实现异步加载数据 实现简单操作 zTree 下载 api 访问 :http://www.ztree.me/v3/main.php 例子中用到json数据转化 newtons ...

  10. C++对象内存模型2 (虚函数,虚指针,虚函数表)

    从例子入手,考察如下带有虚函数的类的对象内存模型: class A { public: virtual void vfunc1(); virtual void vfunc2(); void func1 ...