CommonDialog.RunDialog(IntPtr) 方法

定义

在派生类中进行重写时,将被调用以显示 Win32Win32 通用对话框的特定类型。When overridden in a derived class, is called to display a particular type of Win32Win32 common dialog.

protected:
 abstract bool RunDialog(IntPtr hwndOwner);
protected abstract bool RunDialog (IntPtr hwndOwner);
abstract member RunDialog : nativeint -> bool
Protected MustOverride Function RunDialog (hwndOwner As IntPtr) As Boolean

参数

hwndOwner
IntPtr

对话框所在的窗口的句柄。Handle to the window that owns the dialog box.

返回

如果用户单击显示的对话框(例如 OpenFileDialogSaveFileDialog)的“确定”按钮,则返回 true;否则返回 falseIf the user clicks the OK button of the dialog that is displayed (e.g. OpenFileDialog, SaveFileDialog), true is returned; otherwise, false.

注解

最终显示的对话框将被分配一个所有者窗口, 该窗口由hwndOwner参数指定。The dialog that is eventually shown is assigned an owner window, which is specified by the hwndOwner parameter.

适用于