ArcObjects Library Reference (Framework)  

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
);
[C#]

Optional Values

bShow   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.

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

.NET Snippets

Open MxDialog | Open GxDialog |