Tab Control

Input Design

Source Code

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 tab_control
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Double r = double.Parse(textBox1.Text);
MessageBox.Show("area = " + 3.14 * r * r);

}
private void button2_Click(object sender, EventArgs e)
{
Double a = double.Parse(textBox2.Text);
MessageBox.Show("area = " + (a * a));
}
private void button3_Click(object sender, EventArgs e)
{
Double b = double.Parse(textBox3.Text);
Double h = double.Parse(textBox4.Text);
MessageBox.Show("area = " + (0.5 * b * h));
}
}
}

Output Screen


No comments:

Post a Comment