Evaluar y enviar comentarios
Contraer todo/Expandir todo Contraer todo
Esta página es específica de
Microsoft Visual Studio 2008/.NET Framework 3.5

Hay además otras versiones disponibles para:
Biblioteca de clases de .NET Framework
FormWindowState (Enumeración)

Actualización: noviembre 2007

Especifica cómo se muestra una ventana de formulario.

Espacio de nombres:  System.Windows.Forms
Ensamblado:  System.Windows.Forms (en System.Windows.Forms.dll)
Visual Basic (Declaración)
<ComVisibleAttribute(True)> _
Public Enumeration FormWindowState
Visual Basic (Uso)
Dim instance As FormWindowState
C#
[ComVisibleAttribute(true)]
public enum FormWindowState
Visual C++
[ComVisibleAttribute(true)]
public enum class FormWindowState
J#
/** @attribute ComVisibleAttribute(true) */
public enum FormWindowState
JScript
public enum FormWindowState
Nombre de miembroDescripción
ty62k3kc.CFW(es-es,VS.90).gifNormalVentana de tamaño predeterminado.
MinimizedVentana minimizada.
ty62k3kc.CFW(es-es,VS.90).gifMaximizedVentana maximizada.

La clase Form utiliza esta enumeración. Representa los diferentes estados del formulario. El estado predeterminado es Normal.

En este ejemplo, el estado de la ventana del formulario se cambia a Maximized y se muestra información sobre el estado mediante una etiqueta. En este ejemplo se supone que ya se ha creado un Form denominado Form1.

Visual Basic
Public Sub InitMyForm()
   ' Adds a label to the form.
   Dim label1 As New Label()
   label1.Location = New System.Drawing.Point(54, 128)
   label1.Name = "label1"
   label1.Size = New System.Drawing.Size(220, 80)
   label1.Text = "Start Position Information"
   Me.Controls.Add(label1)

   ' Changes the windows state to Maximized.
   WindowState = FormWindowState.Maximized
   ' Displays the window information.
   label1.Text = "The Form Window is " + WindowState
End Sub 'InitMyForm
C#
public void InitMyForm()
{
    // Adds a label to the form.
    Label label1 = new Label();
    label1.Location = new System.Drawing.Point(54, 128);
    label1.Name = "label1";
    label1.Size = new System.Drawing.Size(220, 80);
    label1.Text = "Start position information";
    this.Controls.Add(label1);

    // Changes the window state to Maximized.
    WindowState = FormWindowState.Maximized;
    // Displays the state information.
    label1.Text = "The form window is " + WindowState;    
}
Visual C++
public:
   void InitMyForm()
   {
      // Adds a label to the form.
      Label^ label1 = gcnew Label;
      label1->Location = System::Drawing::Point( 54, 128 );
      label1->Name = "label1";
      label1->Size = System::Drawing::Size( 220, 80 );
      label1->Text = "Start position information";
      this->Controls->Add( label1 );

      // Changes the window state to Maximized.
      WindowState = FormWindowState::Maximized;

      // Displays the state information.
      label1->Text = String::Format( "The form window is {0}", WindowState );
   }
J#
public void InitMyForm()
{
    // Adds a label to the form.
    Label label1 = new Label();

    label1.set_Location(new System.Drawing.Point(54, 128));
    label1.set_Name("label1");
    label1.set_Size(new System.Drawing.Size(220, 80));
    label1.set_Text("Start position information");
    this.get_Controls().Add(label1);

    // Changes the window state to Maximized.
    set_WindowState(FormWindowState.Maximized);

    // Displays the state information.
    label1.set_Text("The form window is " + get_WindowState());
} //InitMyForm

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile para Smartphone, Windows Mobile para Pocket PC

.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

.NET Framework

Compatible con: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Compatible con: 3.5, 2.0, 1.0
Contenido de la comunidad   ¿Qué es Community Content?
Agregar contenido nuevo RSS  Anotaciones
Processing
© 2012 Microsoft. Reservados todos los derechos. Términos de uso | Marcas Registradas | Privacidad
Page view tracker