usuario y password


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Usuario_Pasword
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void btnAceptar_Click(object sender, EventArgs e)
{
if (txtUsuario.Text == "tuloquita" && txtPasword.Text == "gaby")
{
MessageBox.Show("Usuario y Pasword Valido", "Usuario");

}
else
{
MessageBox.Show("Usuario y Pasword Invalido", "Usuario");
}
}
}
}
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

ingresar un numero de 7 digitos


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace __cifras
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
int unidades, decenas,centenas,unidadesdemillar,decenasdemillar,centenasdemillar,unidaddemillon;
unidades = Convert.ToInt32(this.txtNumero.Text) % 10;
decenas = (Convert.ToInt32(this.txtNumero.Text) %100/10) ;
centenas = (Convert.ToInt32(this.txtNumero.Text) % 1000/100);
unidadesdemillar = (Convert.ToInt32(this.txtNumero.Text) % 10000 / 1000);
decenasdemillar= (Convert.ToInt32(this.txtNumero.Text) % 100000 / 10000);
centenasdemillar = (Convert.ToInt32(this.txtNumero.Text) % 1000000 / 100000);
unidaddemillon = (Convert.ToInt32(this.txtNumero.Text) % 10000000 / 1000000);
this.txtUnidades.Text = Convert.ToString(unidades);
this.txtDecenas.Text = Convert.ToString(decenas);
this.txtCentenas.Text = Convert.ToString(centenas);
this.txtUnidadM.Text = Convert.ToString(unidadesdemillar);
this.txtDecenaM.Text = Convert.ToString(decenasdemillar);
this.txtCentenaM.Text = Convert.ToString(centenasdemillar);
this.txtUnidadMillon.Text = Convert.ToString(unidaddemillon);
this.txtNumero.SelectAll();
this.txtNumero.Focus();
this.txtNumero.Text = "";
}

private void txtNumero_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
this.btnCalcula.Focus();
}
}
}
}
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

caracteristicas de un ordenador


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ordenador
{
public partial class frmOrdenador : Form
{
public frmOrdenador()
{
InitializeComponent();
}

private void btnMicroprocesador_Click(object sender, EventArgs e)
{
MessageBox.Show("Pentium VI","Microprocesador");

}

private void btnRam_Click(object sender, EventArgs e)
{
MessageBox.Show("1 GB","Memoria RAM");
}

private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show("80 GB","Capacidad del Disco Duro");
}

private void btnSistemaoperativo_Click(object sender, EventArgs e)
{
MessageBox.Show("windows","Sistema Operativo");
}
}
}
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

datos de libro


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace libros
{
public partial class frmLibros : Form
{
public frmLibros()
{
InitializeComponent();
}

private void btnTitulo_Click(object sender, EventArgs e)
{
lbltitulo.Text = "base de datos";
string texto = lbltitulo.Text;
}

private void btnAutor_Click(object sender, EventArgs e)
{
lblAutor.Text = "joyanes";
string texto = lblAutor.Text;
}

private void btnEditorial_Click(object sender, EventArgs e)
{
lblEditorial.Text = "navarrete";
string texto = lblEditorial.Text;
}

private void btnEdicion_Click(object sender, EventArgs e)
{
lblEdicion.Text = "2006";
string texto = lblEdicion.Text;
}

private void btnNrodepaginas_Click(object sender, EventArgs e)
{
lblNrodepaginas.Text = "456";
string texto = lblNrodepaginas.Text;
}
}
}
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

suma


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace suma
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void btnsuma_Click(object sender, EventArgs e)
{
int resultado;
resultado = Convert.ToInt32(this.txtnro1.Text) + Convert.ToInt32(this.txtnro2.Text);
this.txtrespuesta.Text = Convert.ToString(resultado);
txtnro1.SelectAll();
txtnro1.Focus();
}

private void txtnro1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
txtnro2.SelectAll();
txtnro2.Focus();
txtnro2.Text = "";
txtrespuesta.Text = "";
}
}

private void txtnro2_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == 13)
this.btnsuma.Focus();
}


}
}
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

mostrar texto


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ejemplo_2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void btnAceptar_Click(object sender, EventArgs e)
{
MessageBox.Show("bienvenidos a visual c# sharp", "bienvenida");
lblMensaje.Text=("hola a todos ");

}
}
}
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

mensaje de bienvenida


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ejemplo_1
{
public partial class frmVisualC : Form
{
public frmVisualC()
{
InitializeComponent();
}

private void btnAceptar_Click(object sender, EventArgs e)
{
lblMensaje.Text = "bienvenidos visual c# .net";
}

private void btlLimpiar_Click(object sender, EventArgs e)
{
lblMensaje.Text = "";
}


}
}
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Buscar en este blog