Share via


SelectPictureDialog.ShowDialog Method

3/29/2010

Displays the "Select Picture" 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

A DialogResult value.

Remarks

This is a modal dialog box.

Example

This sample shows how to call and display the custom dialog box for selecting pictures. The resulting dialog will:

  • Filter out image files by displaying only .JPG and .BMP files.

  • Launch the dialog in the '\My Device\My Images' directory

  • Display a custom title.

SelectPictureDialog pickerDialog = new SelectPictureDialog();

pickerDialog.Filter = "Image Files(*.BMP;*.JPG)|*.BMP;*.JPG";
pickerDialog.InitialDirectory = @"\My Device\My Images";
pickerDialog.Title ="Select an image file";

pickerDialog.ShowDialog();

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

SelectPictureDialog Class
SelectPictureDialog Members
Microsoft.WindowsMobile.Forms Namespace