This document is archived and information here might be outdated.  Recommended version.


IApplication.ShowDialog Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Framework > ESRI.ArcGIS.Framework > Interfaces > IA > IApplication Interface > IApplication.ShowDialog Method
ArcGIS Developer Help

IApplication.ShowDialog Method

Displays the specified dialog in the application.

[Visual Basic .NET]
Public Function ShowDialog ( _
    ByVal dialogID As Integer, _
    [ByRef bShow As Object] _
) As Object
[C#]
public object ShowDialog (
    int dialogID,
    ref object bShow
);

Product Availability

Available with ArcGIS Desktop.

Description

Refer to the esriMxDlgIDs Constants help topic for a listing of the dialog ids in ArcMap.

Refer to the esriGxDlgIDs Constants help topic for a listing of the dialog ids in ArcCatalog.

Remarks

This example shows the TOC in ArcMap if it is not already visible. You would get m_app from the hook in ICommand::OnCreate().

[C#]

object bShow = (object)true;
//The dialog ID for the TOC is 6
if (!(m_app.IsDialogVisible(6)))
  m_app.ShowDialog(6, ref bShow);

[Visual Basic .NET]

Dim bShow As Object = DirectCast(True, Object)
'The dialog ID for the TOC is 6
If Not (m_app.IsDialogVisible(6)) Then
 m_app.ShowDialog(6, bShow)
End If

See Also

IApplication Interface | esriMxDlgIDs Constants | esriGxDlgIDs Constants