Ficar

Páginas: 37 (9084 palabras) Publicado: 2 de diciembre de 2012
EJERCICIO NUMERO 23
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
public partial class Matriz : Form
{
public Matriz()
{
InitializeComponent();
}

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

private void Proceso_Click(object sender, EventArgs e)
{
this.Grilla1.Rows.Add(10);
this.Grilla2.Rows.Add(10);
this.Grilla3.Rows.Add(10);
this.Grilla4.Rows.Add(10);
Random n = new Random();

for(int i = 0; i <4; i++ )for(int j = 0; j <4; j++ )
Grilla1.Rows[i].Cells[j].Value = Convert.ToString(n.Next(20));
for(int i = 0; i <4; i++ )
for(int j = 0; j <4; j++ )
Grilla2.Rows[i].Cells[j].Value=Convert.ToString(n.Next(20));
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)Grilla3.Rows[i].Cells[j].Value = Convert.ToString(n.Next(20));
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
this.Grilla4[i, j].Value = Convert.ToSingle(this.Grilla1[i, j].Value) + Convert.ToSingle(this.Grilla2[i, j].Value) + Convert.ToSingle(this.Grilla3[i, j].Value);

}
}
}
Ejercicio numero 24

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

namespace WindowsApplication1
{
public partial class Imagen : Form
{
public Imagen()
{
InitializeComponent();
}
private void Catgar_Click(object sender, EventArgs e)
{pictureBox1.Image = Image.FromFile(@"C:\Users\adm\Pictures\imagenes\de braulio.jpg");
}

private void Salir_Click(object sender, EventArgs e)
{
Close();
}
}
}
Ejercicio numero 25
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
usingSystem.Windows.Forms;

namespace WindowsApplication1
{
public partial class Colas : Form
{
public int n = 0, m = 1;
public string[] Lista = new string[10];

public Colas()
{
InitializeComponent();
}
private void Agregar_Click(object sender, EventArgs e)
{
n++;
Lista[n] = this.textBox1.Text;switch (n)
{
case 1:
this.c1.Text = Lista[n];
break;
case 2:
this.c2.Text = Lista[n];
break;
case 3:
this.c3.Text = Lista[n];
break;
case 4:
this.c4.Text = Lista[n];break;
case 5:
this.c5.Text = Lista[n];
break;
case 6:
this.c6.Text = Lista[n];
this.Agregar.Enabled = false;
MessageBox.Show("Esta llena la Cola...");
break;
default:
break;}
this.textBox1.Clear();
this.textBox1.Focus();
this.Retirar.Enabled = true;

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

private void Contar()
{
for (int i = 1; i < 6; i++)
if (Lista[i].Length > 0)
{...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • fic
  • fico
  • fico
  • fico
  • fica
  • Fice
  • Fico
  • Fica a ejerc

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS