Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CommonDialog.ShowDialog Method (IWin32Window)

Runs a common dialog box with the specified owner.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public DialogResult ShowDialog (
	IWin32Window owner
)
public DialogResult ShowDialog (
	IWin32Window owner
)
public function ShowDialog (
	owner : IWin32Window
) : DialogResult

Parameters

owner

Any object that implements IWin32Window that represents the top-level window that will own the modal dialog box.

Return Value

DialogResult.OK if the user clicks OK in the dialog box; otherwise, DialogResult.Cancel.

This version of the ShowDialog method allows you to specify a specific form or control that will own the dialog box that is shown. If you use the version of this method that has no parameters, the dialog box being shown would be owned automatically by the currently active window of your application.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.