Share via


TaskDialog.ShowDialog 方法

定义

重载

ShowDialog(TaskDialogPage, TaskDialogStartupLocation)

显示任务对话框。

ShowDialog(IntPtr, TaskDialogPage, TaskDialogStartupLocation)

显示具有指定所有者的任务对话框。

ShowDialog(IWin32Window, TaskDialogPage, TaskDialogStartupLocation)

显示具有指定所有者的任务对话框。

ShowDialog(TaskDialogPage, TaskDialogStartupLocation)

显示任务对话框。

public static System.Windows.Forms.TaskDialogButton ShowDialog (System.Windows.Forms.TaskDialogPage page, System.Windows.Forms.TaskDialogStartupLocation startupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner);
static member ShowDialog : System.Windows.Forms.TaskDialogPage * System.Windows.Forms.TaskDialogStartupLocation -> System.Windows.Forms.TaskDialogButton
Public Shared Function ShowDialog (page As TaskDialogPage, Optional startupLocation As TaskDialogStartupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner) As TaskDialogButton

参数

page
TaskDialogPage

包含此任务对话框将显示的内容的页面实例。

startupLocation
TaskDialogStartupLocation

获取或设置任务对话框在显示时的位置。

返回

用户在关闭对话框时单击的 TaskDialogButton

例外

pagenull

指定的 page 包含无效配置。

注解

显示对话框将绑定 及其控件, page 直到此方法返回或对话框导航到其他页面。

适用于

ShowDialog(IntPtr, TaskDialogPage, TaskDialogStartupLocation)

显示具有指定所有者的任务对话框。

public static System.Windows.Forms.TaskDialogButton ShowDialog (IntPtr hwndOwner, System.Windows.Forms.TaskDialogPage page, System.Windows.Forms.TaskDialogStartupLocation startupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner);
static member ShowDialog : nativeint * System.Windows.Forms.TaskDialogPage * System.Windows.Forms.TaskDialogStartupLocation -> System.Windows.Forms.TaskDialogButton
Public Shared Function ShowDialog (hwndOwner As IntPtr, page As TaskDialogPage, Optional startupLocation As TaskDialogStartupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner) As TaskDialogButton

参数

hwndOwner
IntPtr

nativeint

所有者窗口的句柄,或显示无模式对话框的 Zero

page
TaskDialogPage

包含此任务对话框将显示的内容的页面实例。

startupLocation
TaskDialogStartupLocation

获取或设置任务对话框在显示时的位置。

返回

用户在关闭对话框时单击的 TaskDialogButton

例外

pagenull

指定的 page 包含无效配置。

注解

显示对话框将绑定 及其控件, page 直到此方法返回或对话框导航到其他页面。

适用于

ShowDialog(IWin32Window, TaskDialogPage, TaskDialogStartupLocation)

显示具有指定所有者的任务对话框。

public static System.Windows.Forms.TaskDialogButton ShowDialog (System.Windows.Forms.IWin32Window owner, System.Windows.Forms.TaskDialogPage page, System.Windows.Forms.TaskDialogStartupLocation startupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner);
static member ShowDialog : System.Windows.Forms.IWin32Window * System.Windows.Forms.TaskDialogPage * System.Windows.Forms.TaskDialogStartupLocation -> System.Windows.Forms.TaskDialogButton
Public Shared Function ShowDialog (owner As IWin32Window, page As TaskDialogPage, Optional startupLocation As TaskDialogStartupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner) As TaskDialogButton

参数

owner
IWin32Window

所有者窗口,或显示无模式对话框的 null

page
TaskDialogPage

包含此任务对话框将显示的内容的页面实例。

startupLocation
TaskDialogStartupLocation

获取或设置任务对话框在显示时的位置。

返回

用户在关闭对话框时单击的 TaskDialogButton

例外

ownernull - 或 pagenull

指定的 page 包含无效配置。

注解

显示对话框将绑定 及其控件, page 直到此方法返回或对话框导航到其他页面。

适用于