0% found this document useful (0 votes)
56 views

Kalkulyator

This document contains the code for a calculator application. It includes code to handle button clicks to perform arithmetic operations like addition, subtraction, multiplication and division on two text boxes. It also includes code to toggle the visibility of controls and handle trigonometric, logarithmic and square root functions.

Uploaded by

Ramiz Babayev
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Kalkulyator

This document contains the code for a calculator application. It includes code to handle button clicks to perform arithmetic operations like addition, subtraction, multiplication and division on two text boxes. It also includes code to toggle the visibility of controls and handle trigonometric, logarithmic and square root functions.

Uploaded by

Ramiz Babayev
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace kalkulayator
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)


{

private void Form1_Load(object sender, EventArgs e)


{

private void button4_Click(object sender, EventArgs e)


{
textBox1.Text = Convert.ToString(Convert.ToDouble(textBox2.Text) +
Convert.ToDouble(textBox3.Text));

private void button7_Click(object sender, EventArgs e)


{
textBox1.Text = Convert.ToString(Convert.ToDouble(textBox3.Text) -
Convert.ToDouble(textBox2.Text));
}

private void button6_Click(object sender, EventArgs e)


{
textBox1.Text = Convert.ToString(Convert.ToDouble(textBox2.Text) *
Convert.ToDouble(textBox3.Text));
}

private void button5_Click(object sender, EventArgs e)


{
textBox1.Text = Convert.ToString(Convert.ToDouble(textBox3.Text) /
Convert.ToDouble(textBox2.Text));
}

private void Form1_Activated(object sender, EventArgs e)


{
textBox2.Visible = false;
textBox3.Visible = false;
button4.Visible = false;
button5.Visible = false;
button6.Visible = false;
button7.Visible = false;
button12.Visible = false;
button13.Visible = false;
button10.Visible = false;
button11.Visible = false;
}

private void button13_Click(object sender, EventArgs e)


{
textBox1.Text = Convert.ToString(Math.Sin(Convert.ToDouble(textBox2.Text)));
}

private void button12_Click(object sender, EventArgs e)


{
textBox1.Text = Convert.ToString(Math.Cos(Convert.ToDouble(textBox2.Text)));
}

private void button11_Click(object sender, EventArgs e)


{
textBox1.Text = Convert.ToString(Math.Sqrt(Convert.ToDouble(textBox2.Text)));
}

private void button10_Click(object sender, EventArgs e)


{
textBox1.Text = Convert.ToString(Math.Exp(Convert.ToDouble(textBox2.Text)));
}

private void button9_Click(object sender, EventArgs e)


{
textBox2.Visible = true;
textBox3.Visible = true;
button4.Visible = true;
button5.Visible = true;
button6.Visible = true;
button7.Visible = true;
button12.Visible = false;
button13.Visible = false;
button10.Visible = false;
button11.Visible = false;
}

private void button8_Click(object sender, EventArgs e)


{
textBox2.Visible = true;
textBox3.Visible = false;
button4.Visible = false;
button5.Visible = false;
button6.Visible = false;
button7.Visible = false;
button12.Visible = true;
button13.Visible = true;
button10.Visible = true;
button11.Visible = true;
}
}
}

You might also like