Share via


IUIService.ShowDialog(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

매개 변수

form
Form

표시할 Form입니다.

반환

DialogResult

이 대화 상자가 반환하는 결과 코드를 나타내는 DialogResult 값 중 하나입니다.

예제

다음 코드 예제에서는 클래스의 IUIService 인스턴스를 가져오고 서비스의 ShowDialog 메서드를 호출하려고 시도합니다.

IUIService^ UIservice = dynamic_cast<IUIService^>(this->GetService( System::Windows::Forms::Design::IUIService::typeid ));
if ( UIservice != nullptr )
      UIservice->ShowDialog( gcnew ExampleForm );
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowDialog(new ExampleForm());
Dim UIservice As IUIService = CType(Me.GetService( _
    GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If (UIservice IsNot Nothing) Then
    UIservice.ShowDialog(New ExampleForm())
End If

적용 대상

추가 정보