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


IGetStringDialog Interface (ArcObjects .NET 10.7 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Framework > ESRI.ArcGIS.Framework > Interfaces > IG > IGetStringDialog Interface
ArcGIS Developer Help

IGetStringDialog Interface

Provides access to members that work with a dialog for getting a string.

Product Availability

Available with ArcGIS Desktop.

Members

Name Description
Method DoModal Shows the dialog.
Read-only property Value The value of the string.

Classes that implement IGetStringDialog

Classes Description
GetStringDialog A dialog used for getting a string.

Remarks

The get string dialog is a dialog used for getting user input in the form of a string.

To get access to the IGetStringDialog interface, create a new GetStringDialog object.

The following code shows a GetStringDialog and reports the string value that was entered in the dialog. You would get m_app from the hook in ICommand::OnCreate().

[C#]

IGetStringDialog pGetStrDlg = new GetStringDialogClass();
bool bOK = pGetStrDlg.DoModal("Please enter a string", "String:", "Hello", m_app.hWnd);
if (bOK)
  System.Windows.Forms.MessageBox.Show(pGetStrDlg.Value);
else
  System.Windows.Forms.MessageBox.Show("Cancelled");

[Visual Basic .NET]

Dim pGetStrDlg As IGetStringDialog = New GetStringDialogClass()
Dim bOK As Boolean = pGetStrDlg.DoModal("Please enter a string", "String:", "Hello", m_app.hWnd)
If bOK Then
 System.Windows.Forms.MessageBox.Show(pGetStrDlg.Value)
Else
 System.Windows.Forms.MessageBox.Show("Cancelled")
End If