System.Windows.Forms命名空间的MessageBox.show()用法大全

摘要:
    //     显示消息窗口(也称为对话框)向用户展示消息。 这是一个模式窗口,可阻止应用程序中的其他操作,直到用户将其关闭。 System.Windows.Forms.MessageBox
    //     可包含通知并指示用户的文本、按钮和符号。

//
// 摘要:
//     显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
//   displayHelpButton:
//     如果显示“帮助”按钮,则为 true;否则为 false。 默认值为 false。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, bool displayHelpButton);
//
// 摘要:
//     在指定对象的前面显示具有指定文本、标题和按钮的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons);
//
// 摘要:
//     在指定对象的前面显示具有指定文本、标题、按钮和图标的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon);
//
// 摘要:
//     在指定对象的前面显示具有指定文本、标题、按钮、图标和默认按钮的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton);
//
// 摘要:
//     在指定对象的前面显示具有指定文本、标题、按钮、图标、默认按钮和选项的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - options 指定 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 或
//     System.Windows.Forms.MessageBoxOptions.ServiceNotification 指定中的值和 owner 参数。 仅当调用不采用此方法的版本,则应使用这两个选项
//     owner 参数。 - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options);
//
// 摘要:
//     显示具有指定文本的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
public static DialogResult Show(string text);
//
// 摘要:
//     显示具有指定文本和标题的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
public static DialogResult Show(string text, string caption);
//
// 摘要:
//     显示具有指定文本、标题和按钮的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 指定的参数不是成员的 System.Windows.Forms.MessageBoxButtons。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons);
//
// 摘要:
//     显示具有指定文本、标题、按钮和图标的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 指定的参数不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 指定的参数不是成员的
//     System.Windows.Forms.MessageBoxIcon。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon);
//
// 摘要:
//     在指定对象的前面显示具有指定文本和标题的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
public static DialogResult Show(IWin32Window owner, string text, string caption);
//
// 摘要:
//     显示具有指定文本、标题、按钮、图标和默认按钮的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton);
//
// 摘要:
//     使用指定的帮助文件、HelpNavigator 和帮助主题显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
//   helpFilePath:
//     用户单击“帮助”按钮时显示的“帮助”文件的路径和名称。
//
//   navigator:
//     System.Windows.Forms.HelpNavigator 值之一。
//
//   param:
//     用户单击“帮助”按钮时显示的帮助主题的数值 ID。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, HelpNavigator navigator, object param);
//
// 摘要:
//     使用指定的帮助文件、HelpNavigator 和帮助主题显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
//   helpFilePath:
//     用户单击“帮助”按钮时显示的“帮助”文件的路径和名称。
//
//   navigator:
//     System.Windows.Forms.HelpNavigator 值之一。
//
//   param:
//     用户单击“帮助”按钮时显示的帮助主题的数值 ID。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, HelpNavigator navigator, object param);
//
// 摘要:
//     使用指定的帮助文件和 HelpNavigator 显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
//   helpFilePath:
//     用户单击“帮助”按钮时显示的“帮助”文件的路径和名称。
//
//   navigator:
//     System.Windows.Forms.HelpNavigator 值之一。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, HelpNavigator navigator);
//
// 摘要:
//     使用指定的帮助文件和 HelpNavigator 显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
//   helpFilePath:
//     用户单击“帮助”按钮时显示的“帮助”文件的路径和名称。
//
//   navigator:
//     System.Windows.Forms.HelpNavigator 值之一。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, HelpNavigator navigator);
//
// 摘要:
//     使用指定的帮助文件和帮助关键字显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
//   helpFilePath:
//     用户单击“帮助”按钮时显示的“帮助”文件的路径和名称。
//
//   keyword:
//     在用户单击“帮助”按钮时显示的帮助关键字。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, string keyword);
//
// 摘要:
//     使用指定的帮助文件和帮助关键字显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
//   helpFilePath:
//     用户单击“帮助”按钮时显示的“帮助”文件的路径和名称。
//
//   keyword:
//     在用户单击“帮助”按钮时显示的帮助关键字。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, string keyword);
//
// 摘要:
//     使用指定的帮助文件显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
//   helpFilePath:
//     用户单击“帮助”按钮时显示的“帮助”文件的路径和名称。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath);
//
// 摘要:
//     使用指定的帮助文件显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
//   helpFilePath:
//     用户单击“帮助”按钮时显示的“帮助”文件的路径和名称。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath);
//
// 摘要:
//     显示具有指定文本、标题、按钮、图标、默认按钮和选项的消息框。
//
// 参数:
//   text:
//     要在消息框中显示的文本。
//
//   caption:
//     要在消息框的标题栏中显示的文本。
//
//   buttons:
//     System.Windows.Forms.MessageBoxButtons 值之一,可指定在消息框中显示哪些按钮。
//
//   icon:
//     System.Windows.Forms.MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。
//
//   defaultButton:
//     System.Windows.Forms.MessageBoxDefaultButton 值之一,可指定消息框中的默认按钮。
//
//   options:
//     System.Windows.Forms.MessageBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。 若要使用默认值,请传入 0。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
//
// 异常:
//   T:System.ComponentModel.InvalidEnumArgumentException:
//     buttons 不是成员的 System.Windows.Forms.MessageBoxButtons。 - 或 - icon 不是成员的 System.Windows.Forms.MessageBoxIcon。
//     - 或 - defaultButton 指定不是成员的 System.Windows.Forms.MessageBoxDefaultButton。
//
//   T:System.InvalidOperationException:
//     尝试显示 System.Windows.Forms.MessageBox 在没有用户交互模式中运行的进程中。 这通过指定 System.Windows.Forms.SystemInformation.UserInteractive
//     属性。
//
//   T:System.ArgumentException:
//     options 指定同时 System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly 和 System.Windows.Forms.MessageBoxOptions.ServiceNotification。
//     - 或 - buttons 指定了无效的组合 System.Windows.Forms.MessageBoxButtons。
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options);
//
// 摘要:
//     在指定对象的前面显示具有指定文本的消息框。
//
// 参数:
//   owner:
//     将拥有模式对话框的 System.Windows.Forms.IWin32Window 的一个实现。
//
//   text:
//     要在消息框中显示的文本。
//
// 返回结果:
//     System.Windows.Forms.DialogResult 值之一。
public static DialogResult Show(IWin32Window owner, string text);

猜你喜欢

转载自blog.csdn.net/ctrigger/article/details/107039690