zoukankan      html  css  js  c++  java
  • c#中的 MessageBox 弹出提示框的用法

    MessageBox.Show(<字符串str> Text, <字符串str> Title, <整型int> nType,MessageBoxIcon);

    例:MessageBox.Show("计算结果是" + Convert.ToString( sum),"提醒",MessageBoxButtons.OKCancel,MessageBoxIcon.Information);

    百科解释:

    MessageBox.Show(Text,Title,MessageBoxButtons,MessageBoxIcon,MessageBoxDefaultButtons)
    参数说明:
    (1)Text:必选项,消息框的正文。
    (2)Title:可选项,消息框的标题。
    (3)MessageBoxButtons:可选项,消息框的按钮设置,默认只显示【确定】按钮。
    OK――确定 OKCancel――确定和取消 AbortRetryIgnore――终止、重试和忽略
    YesNoCancel――是、否和取消 YesNo――是和否 RetryCancel――重试和取消
    (4)MessageBoxIcon:对话框中显示的图标样式,默认不显示任何图标。
    Question――问号 Information、Asterisk――i号 Error、Stop、Hand――错误号
    Warning、Exclamation――!号 None――不显示任何图标
    (5)MessageBoxDefaultButtons:可选项,对话框中默认选中的按钮设置。
    DefaultButton1――第1个button是默认按钮
    DefaultButton2――第2个button是默认按钮
    DefaultButton3――第3个button是默认按钮
    备注:函数原型中蓝色字体部分的参数,可以通过点来获取其后面跟随的参数值。
  • 相关阅读:
    Python 爬取网易云歌手的50首热门作品
    对于AES和RSA的个人理解
    sqlzoo
    项目部署 uwsgi+nginx+crm
    nginx学习
    redis补充知识--- 缓存击穿、缓存雪崩、缓存穿透
    redis-cluster 搭建
    redis主从复制
    redis-sentinel (哨兵)
    redis 发布订阅
  • 原文地址:https://www.cnblogs.com/dengzhekaihua/p/10394122.html
Copyright © 2011-2022 走看看