Share via


ChooseContactDialog.ShowDialog Method

3/29/2010

Displays the Contact Chooser dialog box.

Namespace: Microsoft.WindowsMobile.Forms
Assembly: Microsoft.WindowsMobile.Forms (in microsoft.windowsmobile.forms.dll)

Syntax

public DialogResult ShowDialog ()
'Declaration
Public Function ShowDialog As DialogResult

Return Value

The dialog result for the form. For more information, see Form.DialogResult Property in the .NET Framework Class Library on MSDN.

Example

This example shows how to call and display a custom dialog box for choosing Contacts. The resulting dialog will also display a custom title.

ChooseContactDialog contactPicker = new ChooseContactDialog();

contactPicker.Title = "Choose a Contact below:";
contactPicker.ChooseContactOnly = true;
contactPicker.ShowDialog();

Console.WriteLine("The contact selected was {0}.", contactPicker.SelectedContactName);

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

ChooseContactDialog Class
ChooseContactDialog Members
Microsoft.WindowsMobile.Forms Namespace