• VB.NET的MsgBox


    一、可用按钮(指定消息框显示哪些按钮)
    MsgBoxStyle.OkOnly = vbOKOnly = 0(确定按钮)
    MsgBoxStyle.OkCancel = vbOKCancel = 1(确定、取消按钮)
    MsgBoxStyle.AbortRetryIgnore = vbAbortRetryIgnore = 2(终止、重试、忽略按钮)
    MsgBoxStyle.YesNoCancel = vbYesNoCancel = 3(是、否、取消按钮)
    MsgBoxStyle.YesNo = vbYesNo = 4(是、否按钮)
    MsgBoxStyle.RetryCancel = vbRetryCancel = 5(重试、取消按钮)
    二、可用图标(指定消息框显示哪种图标)
    MsgBoxStyle.Critical = vbCritical = 16(错误图标)
    MsgBoxStyle.Question = vbQuestion = 32(问号图标)
    MsgBoxStyle.Exclamation = vbExclamation = 48(警号图标)
    MsgBoxStyle.Information = vbInformation = 64(信息图标)
    三、默认按钮(指定消息框的默认按钮)
    MsgBoxStyle.DefaultButton1 = vbDefaultButton1 = 0(指定第1个按钮为默认按钮)
    MsgBoxStyle.DefaultButton2 = vbDefaultButton2 = 256(指定第2个按钮为默认按钮)
    MsgBoxStyle.DefaultButton3 = vbDefaultButton3 = 512(指定第3个按钮为默认按钮)
    四、函数返回值MsgBoxResult(指明用户所选择的按钮)
    MsgBoxResult.Ok = DialogResult.OK = vbOK = 1(确定按钮)
    MsgBoxResult.Cancel = DialogResult.Cancel = vbCancel = 2(取消按钮)
    MsgBoxResult.Abort = DialogResult.Abort = vbAbort = 3(放弃按钮)
    MsgBoxResult.Retry = DialogResult.Retry = vbRetry = 4(重试按钮)
    MsgBoxResult.Ignore = DialogResult.Ignore = vbIgnore = 5(忽略按钮)
    MsgBoxResult.Yes = DialogResult.Yes = vbYes=6(是按钮)MsgBoxResult.No = DialogResult.No = vbNo=7(否按钮)

    用&连接

    C#的MessageBox是分开的,不用& 连接

  • 相关阅读:
    vue-指令
    VueMusic-14搜索实现
    VueMusic-13歌手列表
    VueMusic-12歌词滚动
    VueMusic-11播放-歌词适配
    VueMusic-10.播放-歌词加载
    VueMusic-9.播放-播放功能
    VueMusic-8更多-下拉刷新
    VueMusic-7更多-数据适配
    VueMusic-6首页-热门榜单
  • 原文地址:https://www.cnblogs.com/mingming00/p/8616445.html
Copyright © 2020-2023  润新知