Está en la página 1de 11

PRACTICA1

CORRIDA

PRACTICA 1
using
using
using
using
using
using
using

CODIGO

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

namespace WindowsApplication1
{
public partial class lblpractica1 : Form
{
public lblpractica1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void CMDSUMA_Click(object sender, EventArgs e)
{
int suma;
suma=2+4;
TXTSUMA.Text = suma.ToString();

}
private void cmdsalir_Click(object sender, EventArgs e)
{
Close();
}
}

PRACTICA 2 CORRIDA Y CODIGO

using
using
using
using
using
using
using
using

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

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void button1_Click(object sender, EventArgs e)
{
int n1, n2, sum;
n1 = System.Int32.Parse(textBox1.Text);
n2 = System.Int32.Parse(textBox2.Text);
sum = n1 + n2;
textBox3.Text = sum.ToString();
}
}

PRACTICA 3 CORRIDA

PRACTICA 3 CODIGO
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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void cmdaceptar_Click(object sender, EventArgs e)
{
//declaracion de variables;
int sem, nc;
float prom;
string car, nom;
//asignacion de variables;
nc = System.Int32.Parse(txtnc.Text);
nom = txtnom.Text;
car = txtcar.Text;
sem = System.Int32.Parse(txtsem.Text);
prom = System.Int32.Parse(txtprom.Text);
//condicion compuesta;
if (prom >= 90 && sem == 5)
lbldespliega.Text = "HAZ SIDO ACEPTADO PARA EL CONCURSO";
else
lbldespliega.Text="NO HAZ SIDO ACEPTADO PARA EL CONCURSO";
}
private void cmdlimpiar_Click(object sender, EventArgs e)
{
txtnc.Text = "";
txtnom.Text = "";
txtcar.Text = "";
txtprom.Text = "";
txtsem.Text = "";
lbldespliega.Text = "";
}
private void cmdsalir_Click(object sender, EventArgs e)
{
Close();
}
}
}

PRACTICA 4 CORRIDA

PRACTICA 4 CODIGO
using
using
using
using
using
using
using
using

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

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//declaracion de variables;
string departamento;
//asignacion de variables;
departamento=txtdepartamento.Text;
//condicion;
if(departamento == "sistemas")
lbldespliega.Text="Resibiste un bono";
else
lbldespliega.Text="Lo siento sigue participando";
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void button3_Click(object sender, EventArgs e)
{
txtdepartamento.Text = "";
txtnombre.Text = "";
txtnumerodeempleado.Text = "";
txtpuesto.Text = "";
lbldespliega.Text = "";
}
private void lbldespliega_TextChanged(object sender, EventArgs e)
{
}
}
}

PRACTICA 5 CORRIDA

PRACTICA 5 CODIGO
using
using
using
using
using
using
using
using

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

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void cmdevalua_Click(object sender, EventArgs e)
{
//declaracion
float calificacion;
//asignacion
calificacion = System.Single.Parse(txtcalificacion.Text);
//condicion
if (calificacion>=70)
lblrespuesta.Text="APROVASTE";
else
lblrespuesta.Text="NO APROVASTE";
}
private void cmdsalir_Click(object sender, EventArgs e)
{
Close();
}

}
}
}

private void cmdlimpiar_Click(object sender, EventArgs e)


{
txtcalificacion.Text = "";
lblrespuesta.Text = "";
}

PRACTICA 6 CORRIDA

PRACTICA 6 CODIGO
using
using
using
using
using
using
using
using

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

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void cmddime_Click(object sender, EventArgs e)
{
//declaracion de variables;
int basebox, altura;
int area;
//asignacion de variables;
basebox=System.Int32.Parse(txtbasebox.Text);
altura=System.Int32.Parse(txtaltura.Text);
area=altura*basebox/2;

txtarea.Text = area.ToString();
//condicion u operacion;
if (area>=30)
lbldespliega.Text="UN TRIANGULOTE";
else
lbldespliega.Text="UN TRIANGULITO";
private void button2_Click(object sender, EventArgs e)
{
txtbasebox.Text = "";
txtaltura.Text = "";
lbldespliega.Text = "";
txtarea.Text = "";
}

}
}

private void button3_Click(object sender, EventArgs e)


{
Close();
}

También podría gustarte