IUIService.ShowDialog(Form) Method

Definition

Attempts to display the specified form in a dialog box.

C#
public System.Windows.Forms.DialogResult ShowDialog(System.Windows.Forms.Form form);

Parameters

form
Form

The Form to display.

Returns

One of the DialogResult values indicating the result code returned by the dialog box.

Examples

The following code example attempts to obtain an instance of the IUIService class and invoke the service's ShowDialog method.

C#
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowDialog(new ExampleForm());

Applies to

Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also