FolderBrowserDialog Clase

Definición

Pide al usuario que seleccione una carpeta.Prompts the user to select a folder. Esta clase no puede heredarse.This class cannot be inherited.

public ref class FolderBrowserDialog sealed : System::Windows::Forms::CommonDialog
public sealed class FolderBrowserDialog : System.Windows.Forms.CommonDialog
type FolderBrowserDialog = class
    inherit CommonDialog
Public NotInheritable Class FolderBrowserDialog
Inherits CommonDialog
Herencia

Ejemplos

En el ejemplo de código siguiente se crea una aplicación que permite al usuario abrir archivos de texto enriquecido (. rtf RichTextBox ) dentro del control.The following code example creates an application that enables the user to open rich text (.rtf) files within the RichTextBox control.

// The following example displays an application that provides the ability to
// open rich text files (rtf) into the RichTextBox. The example demonstrates
// using the FolderBrowserDialog to set the default directory for opening files.
// The OpenFileDialog is used to open the file.
#using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>

using namespace System;
using namespace System::Drawing;
using namespace System::Windows::Forms;
using namespace System::IO;
public ref class FolderBrowserDialogExampleForm: public System::Windows::Forms::Form
{
private:
   FolderBrowserDialog^ folderBrowserDialog1;
   OpenFileDialog^ openFileDialog1;
   RichTextBox^ richTextBox1;
   MainMenu^ mainMenu1;
   MenuItem^ fileMenuItem;
   MenuItem^ openMenuItem;
   MenuItem^ folderMenuItem;
   MenuItem^ closeMenuItem;
   String^ openFileName;
   String^ folderName;
   bool fileOpened;

public:

   // Constructor.
   FolderBrowserDialogExampleForm()
   {
      fileOpened = false;
      this->mainMenu1 = gcnew System::Windows::Forms::MainMenu;
      this->fileMenuItem = gcnew System::Windows::Forms::MenuItem;
      this->openMenuItem = gcnew System::Windows::Forms::MenuItem;
      this->folderMenuItem = gcnew System::Windows::Forms::MenuItem;
      this->closeMenuItem = gcnew System::Windows::Forms::MenuItem;
      this->openFileDialog1 = gcnew System::Windows::Forms::OpenFileDialog;
      this->folderBrowserDialog1 = gcnew System::Windows::Forms::FolderBrowserDialog;
      this->richTextBox1 = gcnew System::Windows::Forms::RichTextBox;
      this->mainMenu1->MenuItems->Add( this->fileMenuItem );
      array<System::Windows::Forms::MenuItem^>^temp0 = {this->openMenuItem,this->closeMenuItem,this->folderMenuItem};
      this->fileMenuItem->MenuItems->AddRange( temp0 );
      this->fileMenuItem->Text = "File";
      this->openMenuItem->Text = "Open...";
      this->openMenuItem->Click += gcnew System::EventHandler( this, &FolderBrowserDialogExampleForm::openMenuItem_Click );
      this->folderMenuItem->Text = "Select Directory...";
      this->folderMenuItem->Click += gcnew System::EventHandler( this, &FolderBrowserDialogExampleForm::folderMenuItem_Click );
      this->closeMenuItem->Text = "Close";
      this->closeMenuItem->Click += gcnew System::EventHandler( this, &FolderBrowserDialogExampleForm::closeMenuItem_Click );
      this->closeMenuItem->Enabled = false;
      this->openFileDialog1->DefaultExt = "rtf";
      this->openFileDialog1->Filter = "rtf files (*.rtf)|*.rtf";
      
      // Set the help text description for the FolderBrowserDialog.
      this->folderBrowserDialog1->Description = "Select the directory that you want to use as the default.";
      
      // Do not allow the user to create new files via the FolderBrowserDialog.
      this->folderBrowserDialog1->ShowNewFolderButton = false;
      
      // Default to the My Documents folder.
      this->folderBrowserDialog1->RootFolder = Environment::SpecialFolder::Personal;
      this->richTextBox1->AcceptsTab = true;
      this->richTextBox1->Location = System::Drawing::Point( 8, 8 );
      this->richTextBox1->Size = System::Drawing::Size( 280, 344 );
      this->richTextBox1->Anchor = static_cast<AnchorStyles>(AnchorStyles::Top | AnchorStyles::Left | AnchorStyles::Bottom | AnchorStyles::Right);
      this->ClientSize = System::Drawing::Size( 296, 360 );
      this->Controls->Add( this->richTextBox1 );
      this->Menu = this->mainMenu1;
      this->Text = "RTF Document Browser";
   }


private:

   // Bring up a dialog to open a file.
   void openMenuItem_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      
      // If a file is not opened then set the initial directory to the
      // FolderBrowserDialog::SelectedPath value.
      if (  !fileOpened )
      {
         openFileDialog1->InitialDirectory = folderBrowserDialog1->SelectedPath;
         openFileDialog1->FileName = nullptr;
      }

      
      // Display the openFile Dialog.
      System::Windows::Forms::DialogResult result = openFileDialog1->ShowDialog();
      
      // OK button was pressed.
      if ( result == ::DialogResult::OK )
      {
         openFileName = openFileDialog1->FileName;
         try
         {
            
            // Output the requested file in richTextBox1.
            Stream^ s = openFileDialog1->OpenFile();
            richTextBox1->LoadFile( s, RichTextBoxStreamType::RichText );
            s->Close();
            fileOpened = true;
         }
         catch ( Exception^ exp ) 
         {
            MessageBox::Show( String::Concat( "An error occurred while attempting to load the file. The error is: ", System::Environment::NewLine, exp, System::Environment::NewLine ) );
            fileOpened = false;
         }

         Invalidate();
         closeMenuItem->Enabled = fileOpened;
      }
      // Cancel button was pressed.
      else
      
      // Cancel button was pressed.
      if ( result == ::DialogResult::Cancel )
      {
         return;
      }
   }


   // Close the current file.
   void closeMenuItem_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      richTextBox1->Text = "";
      fileOpened = false;
      closeMenuItem->Enabled = false;
   }


   // Bring up a dialog to chose a folder path in which to open/save a file.
   void folderMenuItem_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      
      // Show the FolderBrowserDialog.
      System::Windows::Forms::DialogResult result = folderBrowserDialog1->ShowDialog();
      if ( result == ::DialogResult::OK )
      {
         folderName = folderBrowserDialog1->SelectedPath;
         if (  !fileOpened )
         {
            
            // No file is opened, bring up openFileDialog in selected path.
            openFileDialog1->InitialDirectory = folderName;
            openFileDialog1->FileName = nullptr;
            openMenuItem->PerformClick();
         }
      }
   }

};


// The main entry point for the application.
int main()
{
   Application::Run( gcnew FolderBrowserDialogExampleForm );
}

// The following example displays an application that provides the ability to 
// open rich text files (rtf) into the RichTextBox. The example demonstrates 
// using the FolderBrowserDialog to set the default directory for opening files.
// The OpenFileDialog class is used to open the file.
using System;
using System.Drawing;
using System.Windows.Forms;
using System.IO;

public class FolderBrowserDialogExampleForm : System.Windows.Forms.Form
{
    private FolderBrowserDialog folderBrowserDialog1;
    private OpenFileDialog openFileDialog1;
    
    private RichTextBox richTextBox1;

    private MainMenu mainMenu1;
    private MenuItem fileMenuItem, openMenuItem;
    private MenuItem folderMenuItem, closeMenuItem;
    
    private string openFileName, folderName;

    private bool fileOpened = false;

    // The main entry point for the application.
    [STAThreadAttribute]
    static void Main() 
    {
        Application.Run(new FolderBrowserDialogExampleForm());
    }


    // Constructor.
    public FolderBrowserDialogExampleForm()
    {
        this.mainMenu1 = new System.Windows.Forms.MainMenu();
        this.fileMenuItem = new System.Windows.Forms.MenuItem();
        this.openMenuItem = new System.Windows.Forms.MenuItem();
        this.folderMenuItem = new System.Windows.Forms.MenuItem();
        this.closeMenuItem = new System.Windows.Forms.MenuItem();

        this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
        this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
        this.richTextBox1 = new System.Windows.Forms.RichTextBox();

        this.mainMenu1.MenuItems.Add(this.fileMenuItem);
        this.fileMenuItem.MenuItems.AddRange(
                            new System.Windows.Forms.MenuItem[] {this.openMenuItem,
                                                                 this.closeMenuItem,
                                                                 this.folderMenuItem});
        this.fileMenuItem.Text = "File";

        this.openMenuItem.Text = "Open...";
        this.openMenuItem.Click += new System.EventHandler(this.openMenuItem_Click);

        this.folderMenuItem.Text = "Select Directory...";
        this.folderMenuItem.Click += new System.EventHandler(this.folderMenuItem_Click);

        this.closeMenuItem.Text = "Close";
        this.closeMenuItem.Click += new System.EventHandler(this.closeMenuItem_Click);
        this.closeMenuItem.Enabled = false;

        this.openFileDialog1.DefaultExt = "rtf";
        this.openFileDialog1.Filter = "rtf files (*.rtf)|*.rtf";

        // Set the help text description for the FolderBrowserDialog.
        this.folderBrowserDialog1.Description = 
            "Select the directory that you want to use as the default.";

        // Do not allow the user to create new files via the FolderBrowserDialog.
        this.folderBrowserDialog1.ShowNewFolderButton = false;

        // Default to the My Documents folder.
        this.folderBrowserDialog1.RootFolder = Environment.SpecialFolder.Personal;

        this.richTextBox1.AcceptsTab = true;
        this.richTextBox1.Location = new System.Drawing.Point(8, 8);
        this.richTextBox1.Size = new System.Drawing.Size(280, 344);
        this.richTextBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | 
                                   AnchorStyles.Bottom | AnchorStyles.Right;

        this.ClientSize = new System.Drawing.Size(296, 360);
        this.Controls.Add(this.richTextBox1);
        this.Menu = this.mainMenu1;
        this.Text = "RTF Document Browser";
    }

    // Bring up a dialog to open a file.
    private void openMenuItem_Click(object sender, System.EventArgs e)
    {
        // If a file is not opened, then set the initial directory to the
        // FolderBrowserDialog.SelectedPath value.
        if (!fileOpened) {
            openFileDialog1.InitialDirectory = folderBrowserDialog1.SelectedPath;
            openFileDialog1.FileName = null;
        }

        // Display the openFile dialog.
        DialogResult result = openFileDialog1.ShowDialog();

        // OK button was pressed.
        if(result == DialogResult.OK) 
        {
            openFileName = openFileDialog1.FileName;
            try
            {
                // Output the requested file in richTextBox1.
                Stream s = openFileDialog1.OpenFile();
                richTextBox1.LoadFile(s, RichTextBoxStreamType.RichText);
                s.Close();    
            
                fileOpened = true;

            } 
            catch(Exception exp)
            {
                MessageBox.Show("An error occurred while attempting to load the file. The error is:" 
                                + System.Environment.NewLine + exp.ToString() + System.Environment.NewLine);
                fileOpened = false;
            }
            Invalidate();

            closeMenuItem.Enabled = fileOpened;
        }

        // Cancel button was pressed.
        else if(result == DialogResult.Cancel) 
        {
            return;
        }
    }


    // Close the current file.
    private void closeMenuItem_Click(object sender, System.EventArgs e)
    {
        richTextBox1.Text = "";
        fileOpened = false;

        closeMenuItem.Enabled = false;
    }


    // Bring up a dialog to chose a folder path in which to open or save a file.
    private void folderMenuItem_Click(object sender, System.EventArgs e)
    {
        // Show the FolderBrowserDialog.
        DialogResult result = folderBrowserDialog1.ShowDialog();
        if( result == DialogResult.OK )
        {
            folderName = folderBrowserDialog1.SelectedPath;
            if(!fileOpened)
            {
                // No file is opened, bring up openFileDialog in selected path.
                openFileDialog1.InitialDirectory = folderName;
                openFileDialog1.FileName = null;
                openMenuItem.PerformClick();
            } 
        }
    }
}
' The following example displays an application that provides the ability to 
' open rich text files (rtf) into the RichTextBox. The example demonstrates 
' using the FolderBrowserDialog to set the default directory for opening files.
' The OpenFileDialog class is used to open the file.
Imports System.Drawing
Imports System.Windows.Forms
Imports System.IO

Public Class FolderBrowserDialogExampleForm 
    Inherits Form
    
    Private folderBrowserDialog1 As FolderBrowserDialog
    Private openFileDialog1 As OpenFileDialog 
    
    Private richTextBox1 As RichTextBox

    Private mainMenu1 As MainMenu
    Private fileMenuItem As MenuItem
    Private WithEvents folderMenuItem As MenuItem, _
                       closeMenuItem As MenuItem, _
                       openMenuItem As MenuItem
    
    Private openFileName As String, folderName As String

    Private fileOpened As Boolean = False

    Public Sub New()
        Me.mainMenu1 = New System.Windows.Forms.MainMenu() 
        Me.fileMenuItem = New System.Windows.Forms.MenuItem() 
        Me.openMenuItem = New System.Windows.Forms.MenuItem() 
        Me.folderMenuItem = New System.Windows.Forms.MenuItem() 
        Me.closeMenuItem = New System.Windows.Forms.MenuItem() 

        Me.openFileDialog1 = New System.Windows.Forms.OpenFileDialog() 
        Me.folderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog() 
        Me.richTextBox1 = New System.Windows.Forms.RichTextBox() 

        Me.mainMenu1.MenuItems.Add(Me.fileMenuItem) 
        Me.fileMenuItem.MenuItems.AddRange( _
                    New System.Windows.Forms.MenuItem() {Me.openMenuItem, _
                                                         Me.closeMenuItem, _
                                                         Me.folderMenuItem}) 
        Me.fileMenuItem.Text = "File" 

        Me.openMenuItem.Text = "Open..." 

        Me.folderMenuItem.Text = "Select Directory..." 

        Me.closeMenuItem.Text = "Close" 
        Me.closeMenuItem.Enabled = False 

        Me.openFileDialog1.DefaultExt = "rtf" 
        Me.openFileDialog1.Filter = "rtf files (*.rtf)|*.rtf" 

        ' Set the Help text description for the FolderBrowserDialog.
        Me.folderBrowserDialog1.Description = _
            "Select the directory that you want to use As the default." 

        ' Do not allow the user to create New files via the FolderBrowserDialog.
        Me.folderBrowserDialog1.ShowNewFolderButton = False 

        ' Default to the My Documents folder.
        Me.folderBrowserDialog1.RootFolder = Environment.SpecialFolder.Personal 

        Me.richTextBox1.AcceptsTab = True 
        Me.richTextBox1.Location = New System.Drawing.Point(8, 8) 
        Me.richTextBox1.Size = New System.Drawing.Size(280, 344) 
        Me.richTextBox1.Anchor = AnchorStyles.Top Or AnchorStyles.Left Or _
                                 AnchorStyles.Bottom Or AnchorStyles.Right 

        Me.ClientSize = New System.Drawing.Size(296, 360) 
        Me.Controls.Add(Me.richTextBox1) 
        Me.Menu = Me.mainMenu1 
        Me.Text = "RTF Document Browser" 
    End Sub
    
    <STAThread()> _
    Shared Sub Main()
        Application.Run(New FolderBrowserDialogExampleForm())
    End Sub

    ' Bring up a dialog to open a file.
    Private Sub openMenuItem_Click(sender As object, e As System.EventArgs) _
        Handles openMenuItem.Click
        ' If a file is not opened, then set the initial directory to the
        ' FolderBrowserDialog.SelectedPath value.
        If (not fileOpened) Then
            openFileDialog1.InitialDirectory = folderBrowserDialog1.SelectedPath 
            openFileDialog1.FileName = nothing 
        End If

        ' Display the openFile dialog.
        Dim result As DialogResult = openFileDialog1.ShowDialog() 

        ' OK button was pressed.
        If (result = DialogResult.OK) Then
            openFileName = openFileDialog1.FileName 
            Try
                ' Output the requested file in richTextBox1.
                Dim s As Stream = openFileDialog1.OpenFile() 
                richTextBox1.LoadFile(s, RichTextBoxStreamType.RichText) 
                s.Close()     
            
                fileOpened = True 

            Catch exp As Exception
                MessageBox.Show("An error occurred while attempting to load the file. The error is:" _
                                + System.Environment.NewLine + exp.ToString() + System.Environment.NewLine) 
                fileOpened = False 
            End Try
            Invalidate() 

            closeMenuItem.Enabled = fileOpened 

        ' Cancel button was pressed.
        ElseIf (result = DialogResult.Cancel) Then
            return 
        End If
    End Sub

    ' Close the current file.
    Private Sub closeMenuItem_Click(sender As object, e As System.EventArgs) _
        Handles closeMenuItem.Click
        richTextBox1.Text = "" 
        fileOpened = False 

        closeMenuItem.Enabled = False 
    End Sub

    ' Bring up a dialog to chose a folder path in which to open or save a file.
    Private Sub folderMenuItem_Click(sender As object, e As System.EventArgs) _
        Handles folderMenuItem.Click
        ' Show the FolderBrowserDialog.
        Dim result As DialogResult = folderBrowserDialog1.ShowDialog() 

        If ( result = DialogResult.OK ) Then
            folderName = folderBrowserDialog1.SelectedPath 
            If (not fileOpened) Then
                ' No file is opened, bring up openFileDialog in selected path.
                openFileDialog1.InitialDirectory = folderName 
                openFileDialog1.FileName = nothing
                openMenuItem.PerformClick() 
            End If
        End If
    End Sub

End Class

Comentarios

Esta clase proporciona una manera de solicitar al usuario que examine, cree y, finalmente, seleccione una carpeta.This class provides a way to prompt the user to browse, create, and eventually select a folder. Utilice esta clase cuando solo desee permitir que el usuario seleccione carpetas, no archivos.Use this class when you only want to allow the user to select folders, not files. La exploración de las carpetas se realiza a través de un control de árbol.Browsing of the folders is done through a tree control. Solo se pueden seleccionar las carpetas del sistema de archivos; las carpetas virtuales no pueden.Only folders from the file system can be selected; virtual folders cannot.

Normalmente, después de crear un FolderBrowserDialognuevo, se establece RootFolder en la ubicación desde la que se iniciará la exploración.Typically, after creating a new FolderBrowserDialog, you set the RootFolder to the location from which to start browsing. Opcionalmente, puede establecer SelectedPath en una ruta de acceso absoluta de una subcarpeta de RootFolder que se seleccionará inicialmente.Optionally, you can set the SelectedPath to an absolute path of a subfolder of RootFolder that will initially be selected. Opcionalmente, también puede establecer la Description propiedad para proporcionar instrucciones adicionales al usuario.You can also optionally set the Description property to provide additional instructions to the user. Por último, llame ShowDialog al método para mostrar el cuadro de diálogo al usuario.Finally, call the ShowDialog method to display the dialog box to the user. Cuando se cierra el cuadro de diálogo y el resultado del cuadro ShowDialog de DialogResult.OKdiálogo es SelectedPath , el valor de será una cadena que contenga la ruta de acceso a la carpeta seleccionada.When the dialog box is closed and the dialog box result from ShowDialog is DialogResult.OK, the SelectedPath will be a string containing the path to the selected folder.

Puede usar la ShowNewFolderButton propiedad para controlar si el usuario puede crear nuevas carpetas con el botón nueva carpeta .You can use the ShowNewFolderButton property to control if the user is able to create new folders with the New Folder button.

FolderBrowserDialoges un cuadro de diálogo modal; por lo tanto, cuando se muestra, bloquea el resto de la aplicación hasta que el usuario ha elegido una carpeta.FolderBrowserDialog is a modal dialog box; therefore, when shown, it blocks the rest of the application until the user has chosen a folder. Cuando se muestra un cuadro de diálogo de forma modal, no se puede producir ninguna entrada (un clic con el teclado o el mouse), excepto los objetos del cuadro de diálogo.When a dialog box is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog box. El programa debe ocultar o cerrar el cuadro de diálogo (normalmente en respuesta a alguna acción del usuario) antes de que se pueda producir la entrada al programa de llamada.The program must hide or close the dialog box (usually in response to some user action) before input to the calling program can occur.

Constructores

FolderBrowserDialog()

Inicializa una nueva instancia de la clase FolderBrowserDialog.Initializes a new instance of the FolderBrowserDialog class.

Propiedades

AutoUpgradeEnabled

Obtiene o establece un valor que indica si el cuadro de diálogo se actualizará de forma automática para habilitar características nuevas.Gets or sets a value that indicates whether the dialog will be automatically upgraded to enable new features.

CanRaiseEvents

Obtiene un valor que indica si el componente puede generar un evento.Gets a value indicating whether the component can raise an event.

(Heredado de Component)
Container

Obtiene IContainer que contiene Component.Gets the IContainer that contains the Component.

(Heredado de Component)
Description

Obtiene o establece el texto descriptivo que se muestra encima del control de vista de árbol en el cuadro de diálogo.Gets or sets the descriptive text displayed above the tree view control in the dialog box.

DesignMode

Obtiene un valor que indica si Component está actualmente en modo de diseño.Gets a value that indicates whether the Component is currently in design mode.

(Heredado de Component)
Events

Obtiene la lista de controladores de eventos asociados a Component.Gets the list of event handlers that are attached to this Component.

(Heredado de Component)
RootFolder

Obtiene o establece la carpeta raíz desde donde se va a empezar a examinar.Gets or sets the root folder where the browsing starts from.

SelectedPath

Obtiene o establece la ruta de acceso seleccionada por el usuario.Gets or sets the path selected by the user.

ShowNewFolderButton

Obtiene o establece un valor que indica si el botón Nueva carpeta aparece en el cuadro de diálogo del explorador de carpetas.Gets or sets a value indicating whether the New Folder button appears in the folder browser dialog box.

Site

Obtiene o establece el ISite de Component.Gets or sets the ISite of the Component.

(Heredado de Component)
Tag

Obtiene o establece un objeto que contiene datos sobre el control.Gets or sets an object that contains data about the control.

(Heredado de CommonDialog)
UseDescriptionForTitle

Obtiene o establece un valor que indica si se va a usar el valor de la propiedad Description como título de los cuadros de diálogo de estilo de Vista.Gets or sets a value that indicates whether to use the value of the Description property as the dialog title for Vista style dialogs. Esta propiedad no tiene ningún efecto en los cuadros de diálogo de estilo antiguo.This property has no effect on old style dialogs.

Métodos

CreateObjRef(Type)

Crea un objeto que contiene toda la información relevante necesaria para generar un proxy utilizado para comunicarse con un objeto remoto.Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Heredado de MarshalByRefObject)
Dispose()

Libera todos los recursos que usa Component.Releases all resources used by the Component.

(Heredado de Component)
Dispose(Boolean)

Libera los recursos no administrados que usa Component y, de forma opcional, libera los recursos administrados.Releases the unmanaged resources used by the Component and optionally releases the managed resources.

(Heredado de Component)
Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Heredado de Object)
GetHashCode()

Sirve como función hash predeterminada.Serves as the default hash function.

(Heredado de Object)
GetLifetimeService()

Recupera el objeto de servicio de duración actual que controla la directiva de duración de esta instancia.Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Heredado de MarshalByRefObject)
GetService(Type)

Devuelve un objeto que representa el servicio suministrado por Component o por Container.Returns an object that represents a service provided by the Component or by its Container.

(Heredado de Component)
GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Heredado de Object)
HookProc(IntPtr, Int32, IntPtr, IntPtr)

Define el procedimiento de enlace para cuadros de diálogo comunes que se reemplaza para agregar una funcionalidad específica a un cuadro de diálogo común.Defines the common dialog box hook procedure that is overridden to add specific functionality to a common dialog box.

(Heredado de CommonDialog)
InitializeLifetimeService()

Obtiene un objeto de servicio de duración para controlar la directiva de duración de esta instancia.Obtains a lifetime service object to control the lifetime policy for this instance.

(Heredado de MarshalByRefObject)
MemberwiseClone()

Crea una copia superficial del Object actual.Creates a shallow copy of the current Object.

(Heredado de Object)
MemberwiseClone(Boolean)

Crea una copia superficial del objeto MarshalByRefObject actual.Creates a shallow copy of the current MarshalByRefObject object.

(Heredado de MarshalByRefObject)
OnHelpRequest(EventArgs)

Genera el evento HelpRequest.Raises the HelpRequest event.

(Heredado de CommonDialog)
OwnerWndProc(IntPtr, Int32, IntPtr, IntPtr)

Define el procedimiento de ventana propietaria que se reemplaza para agregar una funcionalidad específica a un cuadro de diálogo común.Defines the owner window procedure that is overridden to add specific functionality to a common dialog box.

(Heredado de CommonDialog)
Reset()

Restablece los valores predeterminados de las propiedades.Resets properties to their default values.

RunDialog(IntPtr)

Cuando se reemplaza en una clase derivada, especifica un cuadro de diálogo común.When overridden in a derived class, specifies a common dialog box.

(Heredado de CommonDialog)
ShowDialog()

Ejecuta un cuadro de diálogo común con un propietario predeterminado.Runs a common dialog box with a default owner.

(Heredado de CommonDialog)
ShowDialog(IWin32Window)

Ejecuta un cuadro de diálogo común con el propietario especificado.Runs a common dialog box with the specified owner.

(Heredado de CommonDialog)
ToString()

Devuelve una String que contiene el nombre del Component, si existe.Returns a String containing the name of the Component, if any. Este método no se debe invalidar.This method should not be overridden.

(Heredado de Component)

Eventos

Disposed

Se produce cuando el componente se elimina mediante una llamada al método Dispose().Occurs when the component is disposed by a call to the Dispose() method.

(Heredado de Component)
HelpRequest

Se produce cuando el usuario hace clic en el botón Ayuda en el cuadro de diálogo.Occurs when the user clicks the Help button on the dialog box.

Se aplica a

Consulte también: