次の方法で共有


IDialogVisualizerService.ShowDialog Method

Definition

Overloads

ShowDialog(CommonDialog)

Displays a dialog that derives from System.Windows.Forms.CommonDialog.

ShowDialog(Control)

Displays any Windows Forms control derived from System.Windows.Forms.Control.

ShowDialog(Form)

Displays a Windows Form derived from System.Windows.Forms.Form.

ShowDialog(CommonDialog)

Displays a dialog that derives from System.Windows.Forms.CommonDialog.

public:
 System::Windows::Forms::DialogResult ShowDialog(System::Windows::Forms::CommonDialog ^ dialog);
public System.Windows.Forms.DialogResult ShowDialog (System.Windows.Forms.CommonDialog dialog);
abstract member ShowDialog : System.Windows.Forms.CommonDialog -> System.Windows.Forms.DialogResult
Public Function ShowDialog (dialog As CommonDialog) As DialogResult

Parameters

dialog
CommonDialog

Any dialog derived from System.Windows.Forms.CommonDialog.

Returns

Examples

public class DebuggerSide : DialogDebuggerVisualizer
{
    override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
   {
        ColorDialog myDialog = new ColorDialog();
        windowService.ShowDialog(myDialog);
   }
   // Other class methods omitted for clarity.  
}

Remarks

Displays any of the Common Dialogs: ColorDialog, FileDialog, FolderBrowserDialog, FontDialog, PageSetupDialog, or PrintDialog.

Applies to

ShowDialog(Control)

Displays any Windows Forms control derived from System.Windows.Forms.Control.

public:
 System::Windows::Forms::DialogResult ShowDialog(System::Windows::Forms::Control ^ control);
public System.Windows.Forms.DialogResult ShowDialog (System.Windows.Forms.Control control);
abstract member ShowDialog : System.Windows.Forms.Control -> System.Windows.Forms.DialogResult
Public Function ShowDialog (control As Control) As DialogResult

Parameters

control
Control

Any control derived from System.Windows.Forms.Control.

Returns

Examples

public class DebuggerSide : DialogDebuggerVisualizer  
{  
   override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)  
   {  
      Control myControl = new Control();  
      windowService.ShowDialog(myControl);  

   }  
   // Other class methods ommitted for clarity.  
}  
public class DebuggerSide : DialogDebuggerVisualizer
{
    override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
    {
        Control myControl = new Control();
       windowService.ShowDialog(myControl);

    }
    // Other class methods omitted for clarity.  
}

Remarks

Displays a Windows Forms control.

Applies to

ShowDialog(Form)

Displays a Windows Form derived from System.Windows.Forms.Form.

public:
 System::Windows::Forms::DialogResult ShowDialog(System::Windows::Forms::Form ^ form);
public System.Windows.Forms.DialogResult ShowDialog (System.Windows.Forms.Form form);
abstract member ShowDialog : System.Windows.Forms.Form -> System.Windows.Forms.DialogResult
Public Function ShowDialog (form As Form) As DialogResult

Parameters

form
Form

Any Windows Form object derived from System.Windows.Forms.Form.

Returns

Displays a Windows Form.

Examples

public class DebuggerSide : DialogDebuggerVisualizer  
{  
   override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)  
   {  
      Form myForm = new Form();  
      // Add controls, etc. to your form  
      windowService.ShowDialog(myForm);  

   }  
   // Other class methods ommitted for clarity.  
}  
public class DebuggerSide : DialogDebuggerVisualizer
{
    override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
    {
        Form myForm = new Form();
        // Add controls, etc. to your form  
        windowService.ShowDialog(myForm);

    }
    // Other class methods omitted for clarity.  
}

Remarks

Displays a Windows Forms.

Applies to