Messagebox.Show()常用参数的讨论
2016-11-17 17:45
411 查看
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 个参数 "
);
}
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 Settings\Administrator\桌面\新建文本文档.txt"
);
}
}
}
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 个参数 "
);
}
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 Settings\Administrator\桌面\新建文本文档.txt"
);
}
}
}
相关文章推荐
- Messagebox.Show()常用参数的讨论
- Messagebox.show() 常用参数的讨论
- c/s项目中MessageBox.show()方法参数讨论
- Messagebox.Show()常用参数
- 小杂项,MessageBox.Show()的响应方法,""和null,MessageBox.Show()常用参数
- Messagebox.Show()常用参数设置
- C#中Messagebox.Show()常用参数用法详解
- MessageBox.Show 容量超出了最大容量。参数名: capacity
- MessageBox.Show常用的2个方法
- Mysql常用show命令,show variables like xxx 详解,mysql运行时参数
- C#美化出现问题,MessageBox.Show 容量超出了最大容量。参数名: capacity
- Mysql常用show命令,show variables like xxx 详解,mysql运行时参数
- show slave status常用参数备忘
- MessageBox.Show方法出现“容量超出了最大容量。参数名: capacity”错误!
- MessageBox.Show();报最匹配的重载方法具有一些无效参数解决方法
- 异常:MessageBox.Show 容量超出了最大容量。参数名: capacity
- MessageBox常用参数
- MessageBox.Show 容量超出了最大容量。参数名: capacity
- MessageBox.Show()中的提示信息中的参数使用
- C# WinForm中实现MessageBox.Show()的常用方法