Вы находитесь на странице: 1из 20

Fase 04 Estructuras bsicas de programacin, formularios

Presentado por
Jhon Wuilquer Laguna Castellanos
Id: 1077849519

Universidad Abierta y a Distancia UNAD

Cead Pitalito

Ingeniera de Sistemas
Fase 04 Estructuras bsicas de programacin, formularios

Presentado por
Jhon Wuilquer Laguna Castellanos
Id: 1077849519

Tutor
Yerman Augusto Hernndez

Universidad Abierta y a Distancia UNAD

Cead Pitalito

Ingeniera de Sistemas
Contenido

Introduccin ........................................................................................................................................ 4
Objetivos ............................................................................................................................................. 5
Objetivo General ............................................................................................................................. 5
Objetivos Especficos ....................................................................................................................... 5
Vista del Formulario ............................................................................................................................ 6
Campos de Datos Personales .......................................................................................................... 6
Campos de Fecha de Nacimiento .................................................................................................... 7
Campo de la carrera Universitaria .................................................................................................. 7
Campo de Propiedades ................................................................................................................... 7
Ejecucin del Programa................................................................................................................... 8
Cdigo del Aplicativo ..................................................................................................................... 10
Conclusion ..................................................................................................................................... 19
Introduccin

En el presente trabajo vamos a realizar un formulario mediante el software de visual Basic mediante
el cdigo de programacin C# se realizar un formulario de inscripcin de la universidad donde
calculara la edad al igual modificar las propiedades de texto y los campos de texto
Objetivos

Objetivo General

Aplicar los conocimientos adquiridos en el curso de Introduccin a la programacin

Objetivos Especficos

Realizar un formulario mediante el cdigo de programacin de C#


Disear el formulario mediante Visual Basic con los datos requeridos
Aplicar las sentencias de cdigo necesarias para cumplir con lo estipulado en la gua practica
Vista del Formulario

Campos de Datos Personales


Campos de Fecha de Nacimiento

Campo de la carrera Universitaria

Campo de Propiedades
Ejecucin del Programa
Cdigo del Aplicativo
namespace Prueba_02
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Negrita_CheckedChanged(object sender, EventArgs e)


{
this.label1.Font = new Font(this.label1.Font.FontFamily,
this.label1.Font.Size, this.label1.Font.Style ^ FontStyle.Bold);

this.label5.Font = new Font(this.label5.Font.FontFamily,


this.label5.Font.Size, this.label5.Font.Style ^ FontStyle.Bold);

this.label6.Font = new Font(this.label6.Font.FontFamily,


this.label6.Font.Size, this.label6.Font.Style ^ FontStyle.Bold);

this.label7.Font = new Font(this.label7.Font.FontFamily,


this.label7.Font.Size, this.label7.Font.Style ^ FontStyle.Bold);

this.label8.Font = new Font(this.label8.Font.FontFamily,


this.label8.Font.Size, this.label8.Font.Style ^ FontStyle.Bold);

this.label9.Font = new Font(this.label9.Font.FontFamily,


this.label9.Font.Size, this.label9.Font.Style ^ FontStyle.Bold);

this.label10.Font = new Font(this.label10.Font.FontFamily,


this.label10.Font.Size, this.label10.Font.Style ^ FontStyle.Bold);

this.label11.Font = new Font(this.label11.Font.FontFamily,


this.label11.Font.Size, this.label11.Font.Style ^
FontStyle.Bold);

this.label15.Font = new Font(this.label15.Font.FontFamily,


this.label15.Font.Size, this.label15.Font.Style ^
FontStyle.Bold);

private void Italic_CheckedChanged(object sender, EventArgs e)


{
this.label1.Font = new Font(this.label1.Font.FontFamily,
this.label1.Font.Size, this.label1.Font.Style ^ FontStyle.Italic);

this.label5.Font = new Font(this.label5.Font.FontFamily,


this.label5.Font.Size, this.label5.Font.Style ^ FontStyle.Italic);

this.label6.Font = new Font(this.label6.Font.FontFamily,


this.label6.Font.Size, this.label6.Font.Style ^ FontStyle.Italic);

this.label7.Font = new Font(this.label7.Font.FontFamily,


this.label7.Font.Size, this.label7.Font.Style ^ FontStyle.Italic);
this.label8.Font = new Font(this.label8.Font.FontFamily,
this.label8.Font.Size, this.label8.Font.Style ^ FontStyle.Italic);

this.label9.Font = new Font(this.label9.Font.FontFamily,


this.label9.Font.Size, this.label9.Font.Style ^ FontStyle.Italic);

this.label10.Font = new Font(this.label10.Font.FontFamily,


this.label10.Font.Size, this.label10.Font.Style ^ FontStyle.Italic);

this.label11.Font = new Font(this.label11.Font.FontFamily,


this.label11.Font.Size, this.label11.Font.Style ^ FontStyle.Italic);

this.label15.Font = new Font(this.label15.Font.FontFamily,


this.label15.Font.Size, this.label15.Font.Style ^ FontStyle.Italic);

private void Strikeout_ChekedChandged(object sender, EventArgs e)


{
this.label1.Font = new Font(this.label1.Font.FontFamily,
this.label1.Font.Size, this.label1.Font.Style ^ FontStyle.Strikeout);

this.label5.Font = new Font(this.label5.Font.FontFamily,


this.label5.Font.Size, this.label5.Font.Style ^ FontStyle.Strikeout);

this.label6.Font = new Font(this.label6.Font.FontFamily,


this.label6.Font.Size, this.label6.Font.Style ^ FontStyle.Strikeout);

this.label7.Font = new Font(this.label7.Font.FontFamily,


this.label7.Font.Size, this.label7.Font.Style ^ FontStyle.Strikeout);

this.label8.Font = new Font(this.label8.Font.FontFamily,


this.label8.Font.Size, this.label8.Font.Style ^ FontStyle.Strikeout);

this.label9.Font = new Font(this.label9.Font.FontFamily,


this.label9.Font.Size, this.label9.Font.Style ^ FontStyle.Strikeout);

this.label10.Font = new Font(this.label10.Font.FontFamily,


this.label10.Font.Size, this.label10.Font.Style ^
FontStyle.Strikeout);

this.label11.Font = new Font(this.label11.Font.FontFamily,


this.label11.Font.Size, this.label11.Font.Style ^ FontStyle.Strikeout);

this.label15.Font = new Font(this.label15.Font.FontFamily,


this.label15.Font.Size, this.label15.Font.Style ^
FontStyle.Strikeout);
}

private void Underline_ChekedChandged(object sender, EventArgs e)


{
this.label1.Font = new Font(this.label1.Font.FontFamily,
this.label1.Font.Size, this.label1.Font.Style ^ FontStyle.Underline);

this.label5.Font = new Font(this.label5.Font.FontFamily,


this.label5.Font.Size, this.label5.Font.Style ^ FontStyle.Underline);

this.label6.Font = new Font(this.label6.Font.FontFamily,


this.label6.Font.Size, this.label6.Font.Style ^ FontStyle.Underline);

this.label7.Font = new Font(this.label7.Font.FontFamily,


this.label7.Font.Size, this.label7.Font.Style ^ FontStyle.Underline);

this.label8.Font = new Font(this.label8.Font.FontFamily,


this.label8.Font.Size, this.label8.Font.Style ^ FontStyle.Underline);

this.label9.Font = new Font(this.label9.Font.FontFamily,


this.label9.Font.Size, this.label9.Font.Style ^ FontStyle.Underline);

this.label10.Font = new Font(this.label10.Font.FontFamily,


this.label10.Font.Size, this.label10.Font.Style ^ FontStyle.Underline);

this.label11.Font = new Font(this.label11.Font.FontFamily,


this.label11.Font.Size, this.label11.Font.Style ^ FontStyle.Underline);

this.label15.Font = new Font(this.label15.Font.FontFamily,


this.label15.Font.Size, this.label15.Font.Style ^ FontStyle.Underline);
}

private void Consolas_ChekedChandged(object sender, EventArgs e)


{
FontFamily csl = new FontFamily("Consolas");
this.label1.Font = new Font(csl, this.label1.Font.Size,
this.label1.Font.Style);

FontFamily cls1 = new FontFamily("Consolas");


this.label5.Font = new Font(csl, this.label5.Font.Size,
this.label5.Font.Style);

FontFamily cls2 = new FontFamily("Consolas");


this.label6.Font = new Font(csl, this.label6.Font.Size,
this.label6.Font.Style);

FontFamily cls3 = new FontFamily("Consolas");


this.label7.Font = new Font(csl, this.label7.Font.Size,
this.label7.Font.Style);

FontFamily cls4 = new FontFamily("Consolas");


this.label8.Font = new Font(csl, this.label8.Font.Size,
this.label8.Font.Style);

FontFamily cls5 = new FontFamily("Consolas");


this.label9.Font = new Font(csl, this.label9.Font.Size,
this.label9.Font.Style);

FontFamily cls6 = new FontFamily("Consolas");


this.label10.Font = new Font(csl, this.label10.Font.Size,
this.label10.Font.Style);

FontFamily cls7 = new FontFamily("Consolas");


this.label11.Font = new Font(csl, this.label11.Font.Size,
this.label11.Font.Style);

FontFamily cls8 = new FontFamily("Consolas");


this.label15.Font = new Font(csl, this.label15.Font.Size,
this.label15.Font.Style);
}

private void Colonna_ChekedChandged(object sender, EventArgs e)


{
FontFamily csl = new FontFamily("Colonna MT");
this.label1.Font = new Font(csl, this.label1.Font.Size,
this.label1.Font.Style);

FontFamily cls1 = new FontFamily("Colonna MT");


this.label5.Font = new Font(csl, this.label5.Font.Size,
this.label5.Font.Style);

FontFamily cls2 = new FontFamily("Colonna MT");


this.label6.Font = new Font(csl, this.label6.Font.Size,
this.label6.Font.Style);

FontFamily cls3 = new FontFamily("Colonna MT");


this.label7.Font = new Font(csl, this.label7.Font.Size,
this.label7.Font.Style);

FontFamily cls4 = new FontFamily("Colonna MT");


this.label8.Font = new Font(csl, this.label8.Font.Size,
this.label8.Font.Style);

FontFamily cls5 = new FontFamily("Colonna MT");


this.label9.Font = new Font(csl, this.label9.Font.Size,
this.label9.Font.Style);

FontFamily cls6 = new FontFamily("Colonna MT");


this.label10.Font = new Font(csl, this.label10.Font.Size,
this.label10.Font.Style);

FontFamily cls7 = new FontFamily("Colonna MT");


this.label11.Font = new Font(csl, this.label11.Font.Size,
this.label11.Font.Style);

FontFamily cls8 = new FontFamily("Colonna MT");


this.label15.Font = new Font(csl, this.label15.Font.Size,
this.label15.Font.Style);

private void Verdana_ChekedChandged(object sender, EventArgs e)


{
FontFamily csl = new FontFamily("Verdana");
this.label1.Font = new Font(csl, this.label1.Font.Size,
this.label1.Font.Style);

FontFamily csl6 = new FontFamily("Verdana");


this.label5.Font = new Font(csl, this.label5.Font.Size,
this.label5.Font.Style);

FontFamily csl1 = new FontFamily("Verdana");


this.label6.Font = new Font(csl, this.label6.Font.Size,
this.label6.Font.Style);

FontFamily csl2 = new FontFamily("Verdana");


this.label7.Font = new Font(csl, this.label7.Font.Size,
this.label7.Font.Style);

FontFamily csl3 = new FontFamily("Verdana");


this.label8.Font = new Font(csl, this.label8.Font.Size,
this.label8.Font.Style);

FontFamily csl4 = new FontFamily("Verdana");


this.label9.Font = new Font(csl, this.label9.Font.Size,
this.label9.Font.Style);

FontFamily csl5 = new FontFamily("Verdana");


this.label10.Font = new Font(csl, this.label10.Font.Size,
this.label10.Font.Style);

FontFamily csl7 = new FontFamily("Verdana");


this.label11.Font = new Font(csl, this.label11.Font.Size,
this.label11.Font.Style);

FontFamily csl8 = new FontFamily("Verdana");


this.label15.Font = new Font(csl, this.label15.Font.Size,
this.label15.Font.Style);

private void Broadway_ChekedChandged(object sender, EventArgs e)


{
FontFamily csl = new FontFamily("Broadway");
this.label1.Font = new Font(csl, this.label1.Font.Size,
this.label1.Font.Style);

FontFamily cls1 = new FontFamily("Broadway");


this.label5.Font = new Font(csl, this.label5.Font.Size,
this.label5.Font.Style);

FontFamily cls2 = new FontFamily("Broadway");


this.label6.Font = new Font(csl, this.label6.Font.Size,
this.label6.Font.Style);

FontFamily cls3 = new FontFamily("Broadway");


this.label7.Font = new Font(csl, this.label7.Font.Size,
this.label7.Font.Style);

FontFamily cls4 = new FontFamily("Broadway");


this.label8.Font = new Font(csl, this.label8.Font.Size,
this.label8.Font.Style);

FontFamily cls5 = new FontFamily("Broadway");


this.label9.Font = new Font(csl, this.label9.Font.Size,
this.label9.Font.Style);

FontFamily cls6 = new FontFamily("Broadway");


this.label10.Font = new Font(csl, this.label10.Font.Size,
this.label10.Font.Style);

FontFamily cls7 = new FontFamily("Broadway");


this.label11.Font = new Font(csl, this.label11.Font.Size,
this.label11.Font.Style);

FontFamily cls8 = new FontFamily("Broadway");


this.label15.Font = new Font(csl, this.label15.Font.Size,
this.label15.Font.Style);

private void Ocho_ChekedChandged(object sender, EventArgs e)


{
this.label1.Font = new Font(this.label1.Font.FontFamily, 8,
this.label1.Font.Style);

this.label5.Font = new Font(this.label5.Font.FontFamily, 8,


this.label5.Font.Style);

this.label6.Font = new Font(this.label6.Font.FontFamily, 8,


this.label6.Font.Style);

this.label7.Font = new Font(this.label7.Font.FontFamily, 8,


this.label7.Font.Style);

this.label8.Font = new Font(this.label8.Font.FontFamily, 8,


this.label8.Font.Style);

this.label9.Font = new Font(this.label9.Font.FontFamily, 8,


this.label9.Font.Style);

this.label10.Font = new Font(this.label10.Font.FontFamily, 8,


this.label10.Font.Style);

this.label11.Font = new Font(this.label11.Font.FontFamily, 8,


this.label11.Font.Style);

this.label15.Font = new Font(this.label15.Font.FontFamily, 8,


this.label15.Font.Style);
}

private void Diez_ChekedChandged(object sender, EventArgs e)


{
this.label1.Font = new Font(this.label1.Font.FontFamily, 10,
this.label1.Font.Style);

this.label5.Font = new Font(this.label5.Font.FontFamily, 10,


this.label5.Font.Style);

this.label6.Font = new Font(this.label6.Font.FontFamily, 10,


this.label6.Font.Style);

this.label7.Font = new Font(this.label7.Font.FontFamily, 10,


this.label7.Font.Style);
this.label8.Font = new Font(this.label8.Font.FontFamily, 10,
this.label8.Font.Style);

this.label9.Font = new Font(this.label9.Font.FontFamily, 10,


this.label9.Font.Style);

this.label10.Font = new Font(this.label10.Font.FontFamily, 10,


this.label10.Font.Style);

this.label11.Font = new Font(this.label11.Font.FontFamily, 10,


this.label11.Font.Style);

this.label15.Font = new Font(this.label15.Font.FontFamily, 10,


this.label15.Font.Style);
}

private void Doce_ChekedChandged(object sender, EventArgs e)


{
this.label1.Font = new Font(this.label1.Font.FontFamily, 12,
this.label1.Font.Style);

this.label5.Font = new Font(this.label5.Font.FontFamily, 12,


this.label5.Font.Style);

this.label6.Font = new Font(this.label6.Font.FontFamily, 12,


this.label6.Font.Style);

this.label7.Font = new Font(this.label7.Font.FontFamily, 12,


this.label7.Font.Style);

this.label8.Font = new Font(this.label8.Font.FontFamily, 12,


this.label8.Font.Style);

this.label9.Font = new Font(this.label9.Font.FontFamily, 12,


this.label9.Font.Style);

this.label10.Font = new Font(this.label10.Font.FontFamily, 12,


this.label10.Font.Style);

this.label11.Font = new Font(this.label11.Font.FontFamily, 12,


this.label11.Font.Style);

this.label15.Font = new Font(this.label15.Font.FontFamily, 12,


this.label15.Font.Style);

private void Catorce_ChekedChandged(object sender, EventArgs e)


{
this.label1.Font = new Font(this.label1.Font.FontFamily, 14,
this.label1.Font.Style);

this.label5.Font = new Font(this.label5.Font.FontFamily, 14,


this.label5.Font.Style);

this.label6.Font = new Font(this.label6.Font.FontFamily, 14,


this.label6.Font.Style);

this.label7.Font = new Font(this.label7.Font.FontFamily, 14,


this.label7.Font.Style);

this.label8.Font = new Font(this.label8.Font.FontFamily, 14,


this.label8.Font.Style);

this.label9.Font = new Font(this.label9.Font.FontFamily, 14,


this.label9.Font.Style);

this.label10.Font = new Font(this.label10.Font.FontFamily, 14,


this.label10.Font.Style);

this.label11.Font = new Font(this.label11.Font.FontFamily, 14,


this.label11.Font.Style);

this.label15.Font = new Font(this.label15.Font.FontFamily, 14,


this.label15.Font.Style);
}

private void negroToolStripMenuItem_Click(object sender, EventArgs e)


{

private void formatoToolStripMenuItem_Click(object sender, EventArgs e)


{

private void label11_Click(object sender, EventArgs e)


{

private void BtnCalcular_Click(object sender, EventArgs e)


{
DateTime fechanac = FechaNacimiento.Value;
int aos = System.DateTime.Now.Year - fechanac.Year;

if (System.DateTime.Now.Subtract(fechanac.AddYears(aos)).TotalDays<0)
TxtEdad.Text = Convert.ToString(aos - 1);

else

TxtEdad.Text = Convert.ToString(aos);
}

private void label13_Click(object sender, EventArgs e)


{

}
private void toolStripComboBox1_Click(object sender, EventArgs e)
{

private void rehacerToolStripMenuItem_Click(object sender, EventArgs e)


{
textBox1.Undo();
textBox2.Undo();
}

private void deshacerToolStripMenuItem_Click(object sender, EventArgs e)


{

private void copiarToolStripMenuItem_Click(object sender, EventArgs e)


{
textBox1.Copy();
textBox2.Copy();
}

private void recortarToolStripMenuItem_Click(object sender, EventArgs e)


{
textBox1.Cut();
textBox2.Cut();
}

private void pegarToolStripMenuItem_Click(object sender, EventArgs e)


{
textBox1.Paste();
textBox2.Paste();
}

private void seleccionarTodoToolStripMenuItem_Click(object sender, EventArgs


e)
{
textBox1.SelectAll();
textBox2.SelectAll();
}

private void button1_Click(object sender, EventArgs e)


{
textBox1.Clear();
}

private void button5_Click(object sender, EventArgs e)


{
textBox2.Clear();
}

private void button3_Click(object sender, EventArgs e)


{
this.Close();
}
}
}
Conclusion

En la prctica del curso aprendimos aplicar las sintaxis y sentencias de cdigo de C# mediante la
implementacin de formularios mediante el aplicativo de visual Basic ya que esto nos ayuda
afianzar nuestros conocimientos al cumplir la necesidad o las exigencias que nos imponen la
universidad al momento de poner en prctica los conocimientos adquiridos durante el curso a su
vez nos puede ser de utilidad para nuestra vida cotidiana, laboral y acadmica
Referencias

Schildt, H. (2010). Fundamentos de C# 3.0. (pp. 153 - 160). Madrid, ES: McGraw-Hill Espaa.
Recuperado de
http://bibliotecavirtual.unad.edu.co:2077/lib/unadsp/reader.action?docID=10515217&ppg=170

Arreglos multidimensionales: manejo de arreglos bidimensionales

Schildt, H. (2010). Fundamentos de C# 3.0. (pp. 161 - 169). Madrid, ES: McGraw-Hill Espaa.
Recuperado de
http://bibliotecavirtual.unad.edu.co:2077/lib/unadsp/reader.action?docID=10515217&ppg=170

String cadenas de caracteres: trabajar con el objeto string

Schildt, H. (2010). Fundamentos de C# 3.0. (pp. 177 - 182). Madrid, ES: McGraw-Hill Espaa.
Recuperado de
http://bibliotecavirtual.unad.edu.co:2077/lib/unadsp/reader.action?docID=10515217&ppg=170

Вам также может понравиться