jueves, 4 de diciembre de 2008

Practica 3

Problema 1

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 textBox1_TextChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Bienvenido a la practicavisual en c# " + textBox1.Text);
}
}
}

Problema 2

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 button1_Click(object sender, EventArgs e)
{
int h, w;h = int.Parse(textBox1.Text);
w = int.Parse(textBox2.Text);
int Ar = h * w;
int Pe = 2 * (h + w);
textBox3.Text = Ar.ToString();
textBox4.Text = Pe.ToString();
}
}
}

No hay comentarios: