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

DISEÑO:

CÓDIGO:
namespace CONTROL_LISTBOX
{
public partial class FLISTA : Form
{
public FLISTA()
{
InitializeComponent();
}

private void BLISTA_SelectedIndexChanged(object sender, EventArgs e)


{

private void FLISTA_Load(object sender, EventArgs e)


{
TNOMBRES.Focus();
}

private void BAGREGAR_Click(object sender, EventArgs e)


{
BLISTA.Items.Add(TNOMBRES.Text);

TNOMBRES.Clear();

TNOMBRES.Focus();
}

private void BORDENAR_Click(object sender, EventArgs e)


{
BLISTA.Sorted = true;
}

private void BBORRARTODO_Click(object sender, EventArgs e)


{
BLISTA.Items.Clear();
TNOMBRES.Focus();
}

private void BBORRARUNO_Click(object sender, EventArgs e)


{
BLISTA.Items.Remove(BLISTA.SelectedItem);

TNOMBRES.Focus();
}

private void BSALIR_Click(object sender, EventArgs e)


{
Close();
}

private void TNOMBRES_TextChanged(object sender, EventArgs e)


{

private void TNOMBRES_KeyDown(object sender, KeyEventArgs e)


{
if (e.KeyValue == 13)
{
BLISTA.Items.Add(TNOMBRES.Text);

TNOMBRES.Clear();
}
}
}
}

EN EJECUCIÓN:

You might also like