This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Framework > ESRI.ArcGIS.Framework > Interfaces > IA > IApplication Interface > IApplication.ShowDialog Method (ArcObjects .NET 10.5 SDK) |
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 );
Optional Values
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.
This example shows the TOC in ArcMap if it is not already visible. You would get m_app from the hook in ICommand::OnCreate().
object bShow=(object)true;
//The dialog ID for the TOC is 6
if (!(m_app.IsDialogVisible(6)))
m_app.ShowDialog(6, ref bShow);
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
IApplication Interface | esriMxDlgIDs Constants | esriGxDlgIDs Constants