VISUAL STUDIO PRACTICE-PROJECTS

                  VISUAL STUDIO PROJECTS                                                                                                                ARITHMETIC OPERATIONS :

   
  FORM DESIGN:



CODINGS:


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 oper2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox3.Text=="+")
            {
                textBox1.Text = (Convert.ToInt32(comboBox1.Text) + Convert.ToInt32(comboBox2.Text)).ToString();
                MessageBox.Show(textBox1.Text);
            }
            if (comboBox3.Text == "-")
            {
                textBox1.Text = (Convert.ToInt32(comboBox1.Text) - Convert.ToInt32(comboBox2.Text)).ToString();
            }
            if (comboBox3.Text == "*")
            {
                textBox1.Text = (Convert.ToInt32(comboBox1.Text) * Convert.ToInt32(comboBox2.Text)).ToString();
            }
            if (comboBox3.Text == "/")
     {
      textBox1.Text = (Convert.ToInt32(comboBox1.Text)/                    Convert.ToInt32(comboBox2.Text)).ToString();

            }
            comboBox4.Items.Add(textBox1.Text);

           }

        private void button2_Click(object sender, EventArgs e)
        {
            comboBox5.Items.Add(comboBox4.Text);
        }
    }
}


OUTPUT:





ALGEBRA

 FORM 1 DESIGN:


FORM 2 DESIGN 


CODINGS:

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 algebra
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form2 f= new Form2();
            f.Show();      
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form2 f = new Form2();
            f.Show();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Form2 f = new Form2();
            f.Show();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Form2 f = new Form2();
            f.Show();
        }
    }
FORM 2 CODINGS:




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 algebra
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox3.Text = (Convert.ToInt32(textBox1.Text) + Convert.ToInt32(textBox2.Text)).ToString();
            textBox3.Text = (Convert.ToInt32(textBox3.Text) * Convert.ToInt32(textBox3.Text)).ToString();
            MessageBox.Show(textBox3.Text);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox3.Text= (Convert.ToInt32(textBox1.Text)- Convert.ToInt32(textBox2.Text)).ToString();
            textBox3.Text= (Convert.ToInt32(textBox3.Text)*Convert.ToInt32(textBox3.Text)).ToString();
            MessageBox.Show(textBox3.Text);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            textBox3.Text = (Convert.ToInt32(textBox1.Text) * Convert.ToInt32(textBox1.Text)+(Convert.ToInt32(textBox2.Text)*Convert.ToInt32(textBox2.Text))).ToString();
             
            MessageBox.Show(textBox3.Text);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            textBox3.Text = (Convert.ToInt32(textBox1.Text) * Convert.ToInt32(textBox1.Text) - (Convert.ToInt32(textBox2.Text) * Convert.ToInt32(textBox2.Text))).ToString();

            MessageBox.Show(textBox3.Text);
        }

        private void Form2_Load(object sender, EventArgs e)
        {

        }
          
        }
    }

OUTPUT:









EB BILL

FORM DESIGN:



CODINGS:

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 EB_BILL
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            {

                textBox4.Text = (Convert.ToInt32(textBox3.Text) - Convert.ToInt32(textBox2.Text)).ToString();
            }

        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (Convert.ToInt32(textBox4.Text) < 101)
            {
                (textBox5.Text) = ("1").ToString();
            }

            if (Convert.ToInt32(textBox4.Text) <= 201)
            {
                (textBox5.Text) = ("2").ToString();
            }
            {
            (textBox6.Text)=(Convert.ToInt32(textBox5.Text)*100).ToString();
            }
        }
    }
}
        

 OUTPUT:




CREDIT&DEBIT


FORM DESIGN:




CODINGS:

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 credit_debit
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if(comboBox1.Text=="DEBIT")
            {
                textBox6.Text = Convert.ToInt32(textBox4.Text).ToString();
                textBox7.Text = (Convert.ToInt32(textBox1.Text) - Convert.ToInt32(textBox4.Text)).ToString();
                
            }
            else//(comboBox1.Text=="CREDIT")
            {
                textBox5.Text = Convert.ToInt32(textBox4.Text).ToString();
                textBox7.Text = (Convert.ToInt32(textBox1.Text) + Convert.ToInt32(textBox4.Text)).ToString();
            }

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox7_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox6_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox5_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox4_TextChanged(object sender, EventArgs e)
        {

        }
    }
}

OUTPUT:

       




             

             

       
    


                          

Comments