Pia de desarollo visual
Enviado por mrfichas • 12 de Junio de 2019 • Trabajo • 3.511 Palabras (15 Páginas) • 101 Visitas
[pic 1]
[pic 2]
[pic 3]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Usuarios
{
public partial class Form1 : Form
{
int intentos = 1;
public Form1()
{
InitializeComponent();
}
private void CmdAceptar_Click(object sender, EventArgs e)
{
if ((TxtUsuario.Text == "usuario" && TxtPassword.Text == "entrar") || (TxtUsuario.Text == "1234" && TxtPassword.Text == "5678"))
{
MessageBox.Show("Acceso correcto");
Form2 conecta2 = new Form2();
conecta2.Show();
TxtUsuario.Text = ""; TxtPassword.Text = "";
this.Hide();
}
else
{
MessageBox.Show("Error por favor vuelve a intentarlo");
TxtUsuario.Text = "";
TxtPassword.Text = "";
if (intentos == 3)
{
MessageBox.Show("Lo siento Has llegado al limitede errores");
Application.Exit();
}
intentos = intentos + 1;
}
}
private void CmdSalir_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
[pic 4]
namespace Usuarios
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (progressBar1.Value == 100)
{
this.Close();
timer1.Enabled = false;
Form3 Conecta3 = new Form3();
Conecta3.Show();
}
else
{
progressBar1.Value = progressBar1.Value + 10;
}
}
}
}
[pic 5]
[pic 6][pic 7][pic 8][pic 9][pic 10][pic 11][pic 12][pic 13][pic 14]
[pic 15][pic 16]
[pic 17]
[pic 18][pic 19]
[pic 20]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Usuarios
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void CbxPas_SelectedIndexChanged(object sender, EventArgs e)
...