| TechTasks.net |
The Blog is Moved to www.TechTasks.net
namespace calc
{
public partial class Form1 : Form
{
int temp, fn, sn, tot, op;
double fn1, temp1, sn1, tot1;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button16_Click_1(object sender, EventArgs e)
{
textBox1.Text = "";
textBox1.Focus();
}
private void button17_Click_1(object sender, EventArgs e)
{
MessageBox.Show("Thanks for using this CAlculator", "Thanks");
Application.Exit();
}
private void button15_Click_1(object sender, EventArgs e)
{
switch (op)
{
case 1:
sn = int.Parse(textBox1.Text);
tot = temp + sn;
textBox1.Text = "";
textBox1.Text = tot.ToString();
break;
case 2:
sn = int.Parse(textBox1.Text);
tot = temp - sn;
textBox1.Text = "";
textBox1.Text = tot.ToString();
break;
case 3:
sn = int.Parse(textBox1.Text);
tot = temp * sn;
textBox1.Text = "";
textBox1.Text = tot.ToString();
break;
case 4:
sn1 = double.Parse(textBox1.Text);
tot1 = temp1 / sn1;
textBox1.Text = "";
textBox1.Text = tot1.ToString();
break;
}
}
private void button14_Click_1(object sender, EventArgs e)
{
fn1 = Convert.ToDouble(double.Parse(textBox1.Text));
temp1 = fn1;
textBox1.Text = "";
op = 4;
}
private void button13_Click_1(object sender, EventArgs e)
{
fn = Convert.ToInt32(int.Parse(textBox1.Text));
temp = fn;
textBox1.Text = "";
op = 3;
}
private void button12_Click_1(object sender, EventArgs e)
{
fn = int.Parse(textBox1.Text);
temp = fn;
textBox1.Text = "";
op = 2;
}
private void button11_Click_1(object sender, EventArgs e)
{
fn = int.Parse(textBox1.Text);
temp = fn;
textBox1.Text = "";
op = 1;
}
private void button1_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "1";
}
private void button2_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "2";
}
private void button3_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "3";
}
private void button4_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "4";
}
private void button5_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "5";
}
private void button6_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "6";
}
private void button7_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "7";
}
private void button8_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "8";
}
private void button9_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "9";
}
private void button10_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + "0";
}
}
}
Blog Archive
-
▼
2008
(33)
-
►
December
(14)
- Non Editable Rows in GridView
- Validate DropDownList inside GRIDVIEW
- .Net Keyboard Shortcuts
- Grid View Operataions
- FAQ'S & INTERVIEW TIPS
- C#.NET
- ASP.NET
- DOTNET FRAMEWORK
- Projects With Source Code
- Enter Text In Into Two TextBoxes At the Same Time
- Saving Uploaded file into Disk and displaying the ...
- Writing Connection string in web.config file
- Change GridView Row Color When MouseOver
- Working With Command Builder in ASP.NET
-
▼
November
(14)
- JavaScript Validatoin For Basic Controles in ASP.N...
- Dot Net - C#.Net(FAQ'S)
- Dot Net - Asp.Net - Basic II(FAQ'S)
- Dot Net - Asp.Net - Basic I(FAQ'S)
- Famous Books For .NET
- Connecting MySql With Asp.net Using ODBC Drivers
- Simple Calculator In Windows Application Using C#
- Mail Sending Using Net.Mail
- Select All And Delete Using CheckBox In GridView
- GridView DeleteAll,SelectAll,ClearAll(Server Side)...
- GridView Paging & Sorting
- GridView Update,Delete,Adding (Insert) Record...
- Alphabetical Paging in Gridview
- Connecting MySql With C# ASP.NET
-
►
December
(14)



0 comments: