Caracteristicas Menu (Windows Forms) : Form (Login)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Por: José Fredy Isaza

Caracteristicas Menu (Windows Forms)

Form (Login)
Name = Login
BackColor = Navy
FormBorderStyle = None
Opacity = 90%
Size = 578; 261
StartPosition = CenterScreen

Panel (Lado izquierdo)


Name = panel1
BackColor = 0; 0; 64
Dock = Left
Size = 188; 261

Label (Titulo = Login)


Name = label1
BackColor = Navy
Font(Size) = 20
ForeColor = White
Text = Login
Por: José Fredy Isaza

TextBox (Usuario)
Name = TxtUsuario
BackColor = Navy
BorderStyle = None
ForeColor = White
MaxLength = 15
TabIndex = 1
Text = Usuario

lineShape (Línea 1)
Name = lineShape1
BorderColor = DimGray
SlectionColor = Highlight
X1 = 260
X2 = 511
Y1 = 100
Y2 = 100

TextBox (Contraseña)
Name = TxtConstrasena
BackColor = Navy
BorderStyle = None
ForeColor = White
MaxLength = 10
TabIndex = 2
Text = Contraseña

lineShape (Línea 2)
Name = lineShape2
BorderColor = DimGray
SlectionColor = Highlight
X1 = 257
X2 = 508
Y1 = 148
Y2 = 148

Button (Entrar)
Name = BtnEntrar
BackColor = 0; 0; 64
FlatAppearance (Border Size) = 0
FlatAppearance (MouseDownBackColor) = Blue
FlatAppearance (MouseOverBackColor) = 0; 0; 192
FlatStyle = Flat
ForeColor = LightGray
Text = Entrar
UseVisualStyleBackColor = false
Por: José Fredy Isaza

linkLabel (Recuperar contraseña)


Name = linkLabel1
ActiveLinkColor = 0; 0; 192
AllowDrop = True
Autosize = True
BackColor = Navy
DisbledLinkColor= 0; 0; 192
ForeColor = Blue
LinkColor = 128; 128; 255
TabStop = True
Text = Recuperar contraseña
VisitedLinkColor = 128; 0; 128

Button (Minimizar)
Name = BtnMinimizar
BackColor = Navy
Cursor = Hand
FlatAppearance (Border Size) = 0
FlatAppearance (MouseOverBackColor) = Blue
FlatStyle = Flat
ForeColor = White
Text = no va nada
Tool Tip en toolTip1 = Minimizar

Button (Cerrar)
Name = BtnSalir
BackColor = Navy
Cursor = Hand
FlatAppearance (Border Size) = 0
FlatAppearance (MouseOverBackColor) = Blue
FlatStyle = Flat
ForeColor = White
Text = no va nada
Tool Tip en toolTip1 = Salir

Nota: Al inicio del programa digitamos estas


líneas para mover la ventana
[DllImport("user32.DLL", EntryPoint = "ReleaseCapture")]
private extern static void ReleaseCapture();
[DllImport("user32.DLL", EntryPoint = "SendMessage")]
private extern static void SendMessage(System.IntPtr hWnd, int wMsg, int wParam, int lParam);
Por: José Fredy Isaza

Programación (Eventos)
Form (Login)
MouseDown
ReleaseCapture();
SendMessage(this.Handle, 0x112, 0xf012, 0);

TextBox (Usuario)
Enter
If (this.TxtUsuario.Text == "Usuario")
{
this.TxtUsuario.Text = string.Empty;
this.TxtUsuario.ForeColor = Color.White; //resalte
}

Leave
// Cuando ya no tiene el focus, sale del textbox
if (string.IsNullOrEmpty(this.TxtUsuario.Text))
{
this.TxtUsuario.Text = "Usuario";
this.TxtUsuario.ForeColor = Color.White;
}

TextBox (Contraseña)
Enter
if (this.TxtConstrasena.Text == "Contraseña")
{
this.TxtConstrasena.Text = string.Empty;
this.TxtConstrasena.ForeColor = Color.White; //resalte
this.TxtConstrasena.UseSystemPasswordChar = true;
}

Leave
// Cuando ya no tiene el focus, sale del textbox
if (string.IsNullOrEmpty(this.TxtConstrasena.Text))
{
this.TxtConstrasena.Text = "Contraseña";
this.TxtConstrasena.ForeColor = Color.White;
this.TxtConstrasena.UseSystemPasswordChar = false;
}

linkLabel (Recuperar contraseña)


MouseMove
this.linkLabel1.LinkColor = Color.Yellow;
Por: José Fredy Isaza

Button (Minimizar)
Click
this.WindowState = FormWindowState.Minimized;

Button (Salir)
Click
Application.Exit();

Diseño Final

You might also like