Create a Calculator

How to create a calculator in c#

Steps to build a simple calculator in c#

1. Onclick button show the button clicked value in the textbox
 2. Let our Operators the +, -, *, and / take the value in the textbox and store them whenever any of these buttons are clicked.
 3. Let the Equalto button do the calculation by accepting the first value user clicked which has been stored in the operator block and displace the total result on textbox.

Screenshorts:





























CodesSimple-Calculator/Form.cs

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;
//WHAT THE CALCULATOR SHOULD DO.
/// <summary>
/// 1. Onclick button show the button clicked value in the textbox
/// 2. Let our Operators the +, -, *, and / take the value in the textbox and store them whenever
/// any of these buttons are clicked.
/// 3. Let the Equalto button do the calculation by accepting the first value user clicked
/// which has been stored in the operator block and displace the total result on textbox.
///
/// </summary>
namespace ToluSimpleCalculator
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
txtInput.Enabled = false; // so that user cant type inside the txtbox
}
//variables to hold operands
private double valHolder1;
private double valHolder2;
//private bool AddButtonCliked = true;
//private bool MinusButtonCliked = true;
//Varible to hold temporary values
//True if "." is use else false;
private bool hasOn = false;
private bool hasDecimal = false;
private bool inputStatus = true;
bool result = false;
private void Buttonfigureone_Click(object sender, EventArgs e)
{
}
private void txtInput_TextChanged(object sender, EventArgs e)
{
if (hasOn == true)
{
hasOn = true;
txtInput.Enabled = true;
txtInput.ReadOnly = true; //read only mode of textbox
txtInput.RightToLeft = RightToLeft.Yes;
}
}
private void CmdButtonDecimal_Click(object sender, EventArgs e)
{
if (hasOn)
{
clearZeroOnClicked();
if (inputStatus)
{
if (!hasDecimal)
{
if (txtInput.Text.Length != 0)
{
if (txtInput.Text != "0")
{
txtInput.Text += CmdButtonDecimal.Text;
//Toggle the flag to true (only 1 decimal per calculation)
//hasDecimal = true;
}
}
else
{
//Since the length isnt > 1
//make the text 0.
txtInput.Text = "0.";
//hasDecimal = true;
}
}
}
}
}
//Declare a variable that will check which button has been clicked by user.
bool plusButtonClicked = false;
bool minusButtonClicked = false;
private void cmdButtonAdd_Click(object sender, EventArgs e)
{
if (hasOn )
{
//Make sure out input box has a value
if (txtInput.Text.Length != 0)
{
valHolder1 += double.Parse(txtInput.Text);
// same as valHolder1 =valHolder1 + double.Parse(txtInput.Text);
txtInput.Clear();
plusButtonClicked = true;
minusButtonClicked = false;
DividedButtonClicked = false;
timesButtonClicked = false;
}
}
}
private void cmdButtonSubtr_Click(object sender, EventArgs e)
{
if (hasOn)
{
//Make sure the input box has a value
if (txtInput.Text.Length != 0)
{
plusButtonClicked = false;
minusButtonClicked = true;
DividedButtonClicked = false;
timesButtonClicked = false;
valHolder1 += double.Parse(txtInput.Text);
txtInput.Clear();
}
}
}
private void cmdButtonOff_Click(object sender, EventArgs e)
{
// Check if the Calculator is on
if (hasOn)
{
//Make sure the input box has a value
if ((txtInput.Text.Length != 0)||(txtInput.Text.Length == 0))
{
// Then off the Calculator and clear it.
hasOn = false;
txtInput.Clear();
txtInput.Enabled = false;
}
}
}
private bool equalButtonClicked = false;
private void CmdButtonEqualto_Click(object sender, EventArgs e)
{
equalButtonClicked = true;
if (plusButtonClicked == true)
{
result = true;
//Doing the addition by adding
plusButtonClicked = true;
minusButtonClicked = false;
DividedButtonClicked = false;
timesButtonClicked = false;
valHolder2 = valHolder1 + double.Parse(txtInput.Text);
}
else if (minusButtonClicked == true)
{
plusButtonClicked = false;
minusButtonClicked = true;
DividedButtonClicked = false;
timesButtonClicked = false;
valHolder2 = valHolder1 - double.Parse(txtInput.Text);
}
else if (timesButtonClicked == true)
{
plusButtonClicked = false;
minusButtonClicked = false;
DividedButtonClicked = false;
timesButtonClicked = true;
valHolder2 = valHolder1 * double.Parse(txtInput.Text);
}
else if (DividedButtonClicked == true)
{
plusButtonClicked = false;
minusButtonClicked = false;
DividedButtonClicked = true;
timesButtonClicked = false;
valHolder2 = valHolder1 / double.Parse(txtInput.Text);
}
txtInput.Text = valHolder2.ToString();
valHolder1 = 0;
}
//When we on this calc. 0 shows on the textbox so now we
// Declare a variable that will be use to store the 0 when the ON button is clicked.
//So that it will not be added to any number user clicked.
//The valHolder4 will do its assignment inside each button or we write a constructor for it.
// Take a look at the constructor named clearZeroOnClicked(). It does the rest of the work.
double valHolder3;
double valHolder4;
private void cmdButtonOn_Click(object sender, EventArgs e)
{
if (!hasOn)
{
hasOn = true;
txtInput.Enabled = true;
txtInput.Text = "0";
// just take off the zero and store it in valHolder3
//we dont want the 0 to be at the front of any number user clicked
// So we dont need the zero , than to prove that the calculator has on by showing whenever the ON
//button is clicked.
valHolder3 += double.Parse(txtInput.Text);
//txtInput.Clear();
}
}
private void cmdButtonDel_Click(object sender, EventArgs e)
{
if (hasOn)
{
if (txtInput.Text.Length != 0)
{
txtInput.Clear();
}
}
}
private void cmdButtonAdd_KeyPress(object sender, KeyPressEventArgs e)
{
if (hasOn)
{
//Make sure out input box has a value
if (txtInput.Text.Length != 0)
{
valHolder1 += double.Parse(txtInput.Text);
//valHolder1 = double.Parse(txtInput.Text);
txtInput.Clear();
}
}
}
bool timesButtonClicked = false;
bool DividedButtonClicked = false;
private void cmdButtonMultip_Click(object sender, EventArgs e)
{
if (hasOn)
{
if (txtInput.Text.Length != 0)
{
plusButtonClicked = false;
minusButtonClicked = false;
DividedButtonClicked = false;
timesButtonClicked = true;
valHolder1 += double.Parse(txtInput.Text);
txtInput.Clear();
}
}
}
private void cmdButtonDivision_Click(object sender, EventArgs e)
{
if (hasOn)
{
if (txtInput.Text.Length != 0)
{
plusButtonClicked = false;
minusButtonClicked = false;
DividedButtonClicked = true;
timesButtonClicked = false;
valHolder1 += double.Parse(txtInput.Text);
txtInput.Clear();
}
}
}
private void clearZeroOnClicked()
{
if (hasOn)
{
if (txtInput.Text == "0")
{
valHolder4 = valHolder3 + double.Parse(txtInput.Text);
txtInput.Clear();
}
}
}
// bool squareButtonClicked;
private bool clearSquareR = false;
private void cmdBtnSquarer_Click(object sender, EventArgs e)
{
if (hasOn)
{
//Make sure out input box has a value
if (txtInput.Text.Length != 0)
{
valHolder1 += double.Parse(txtInput.Text);
txtInput.Clear();
double total = valHolder1 * valHolder1;
//valHolder1 = double.Parse(txtInput.Text);
txtInput.Text = total.ToString();
valHolder1 = 0;
clearSquareR = true;
}
}
}
private void myButton(object sender, EventArgs e)
{
if (hasOn)
{
Button MyButton = sender as Button;
clearZeroOnClicked();
if ((equalButtonClicked)||(clearSquareR))
{
txtInput.Clear();
equalButtonClicked = false;
clearSquareR = false;
}
txtInput.Text += MyButton.Text;
}
}
}
} Simple-Calculator/Form1.Designer.cs
namespace ToluSimpleCalculator
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cmdButtonSquarer = new System.Windows.Forms.Panel();
this.cmdBtnSquarer = new System.Windows.Forms.Button();
this.CmdButtonDecimal = new System.Windows.Forms.Button();
this.cmdButtonOn = new System.Windows.Forms.Button();
this.cmdButtonDel = new System.Windows.Forms.Button();
this.button17 = new System.Windows.Forms.Button();
this.txtInput = new System.Windows.Forms.TextBox();
this.cmdButtonOff = new System.Windows.Forms.Button();
this.cmdButtonDivision = new System.Windows.Forms.Button();
this.button14 = new System.Windows.Forms.Button();
this.cmdButtonSubtr = new System.Windows.Forms.Button();
this.cmdButtonAdd = new System.Windows.Forms.Button();
this.CmdButtonEqualto = new System.Windows.Forms.Button();
this.ButtonfigureZero = new System.Windows.Forms.Button();
this.Buttonfigurenine = new System.Windows.Forms.Button();
this.Buttonfigureeight = new System.Windows.Forms.Button();
this.Buttonfigureseven = new System.Windows.Forms.Button();
this.Buttonfiguresix = new System.Windows.Forms.Button();
this.Buttonfigurefive = new System.Windows.Forms.Button();
this.Buttonfigurefour = new System.Windows.Forms.Button();
this.Buttonfigurethree = new System.Windows.Forms.Button();
this.Buttonfiguretwo = new System.Windows.Forms.Button();
this.Buttonfigureone = new System.Windows.Forms.Button();
this.cmdButtonSquarer.SuspendLayout();
this.SuspendLayout();
//
// cmdButtonSquarer
//
this.cmdButtonSquarer.AutoSize = true;
this.cmdButtonSquarer.BackColor = System.Drawing.Color.GreenYellow;
this.cmdButtonSquarer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.cmdButtonSquarer.Controls.Add(this.cmdBtnSquarer);
this.cmdButtonSquarer.Controls.Add(this.CmdButtonDecimal);
this.cmdButtonSquarer.Controls.Add(this.cmdButtonOn);
this.cmdButtonSquarer.Controls.Add(this.cmdButtonDel);
this.cmdButtonSquarer.Controls.Add(this.button17);
this.cmdButtonSquarer.Controls.Add(this.txtInput);
this.cmdButtonSquarer.Controls.Add(this.cmdButtonOff);
this.cmdButtonSquarer.Controls.Add(this.cmdButtonDivision);
this.cmdButtonSquarer.Controls.Add(this.button14);
this.cmdButtonSquarer.Controls.Add(this.cmdButtonSubtr);
this.cmdButtonSquarer.Controls.Add(this.cmdButtonAdd);
this.cmdButtonSquarer.Controls.Add(this.CmdButtonEqualto);
this.cmdButtonSquarer.Controls.Add(this.ButtonfigureZero);
this.cmdButtonSquarer.Controls.Add(this.Buttonfigurenine);
this.cmdButtonSquarer.Controls.Add(this.Buttonfigureeight);
this.cmdButtonSquarer.Controls.Add(this.Buttonfigureseven);
this.cmdButtonSquarer.Controls.Add(this.Buttonfiguresix);
this.cmdButtonSquarer.Controls.Add(this.Buttonfigurefive);
this.cmdButtonSquarer.Controls.Add(this.Buttonfigurefour);
this.cmdButtonSquarer.Controls.Add(this.Buttonfigurethree);
this.cmdButtonSquarer.Controls.Add(this.Buttonfiguretwo);
this.cmdButtonSquarer.Controls.Add(this.Buttonfigureone);
this.cmdButtonSquarer.Dock = System.Windows.Forms.DockStyle.Fill;
this.cmdButtonSquarer.Location = new System.Drawing.Point(0, 0);
this.cmdButtonSquarer.Name = "cmdButtonSquarer";
this.cmdButtonSquarer.Size = new System.Drawing.Size(284, 404);
this.cmdButtonSquarer.TabIndex = 0;
//
// cmdBtnSquarer
//
this.cmdBtnSquarer.Location = new System.Drawing.Point(10, 132);
this.cmdBtnSquarer.Name = "cmdBtnSquarer";
this.cmdBtnSquarer.Size = new System.Drawing.Size(260, 23);
this.cmdBtnSquarer.TabIndex = 22;
this.cmdBtnSquarer.Text = "Sqr";
this.cmdBtnSquarer.UseVisualStyleBackColor = true;
this.cmdBtnSquarer.Click += new System.EventHandler(this.cmdBtnSquarer_Click);
//
// CmdButtonDecimal
//
this.CmdButtonDecimal.AutoSize = true;
this.CmdButtonDecimal.Font = new System.Drawing.Font("Microsoft Sans Serif",
8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CmdButtonDecimal.Location = new System.Drawing.Point(68, 315);
this.CmdButtonDecimal.Name = "CmdButtonDecimal";
this.CmdButtonDecimal.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.CmdButtonDecimal.Size = new System.Drawing.Size(55, 23);
this.CmdButtonDecimal.TabIndex = 21;
this.CmdButtonDecimal.TabStop = false;
this.CmdButtonDecimal.Text = ".";
this.CmdButtonDecimal.UseVisualStyleBackColor = true;
this.CmdButtonDecimal.Click += new System.EventHandler(this.CmdButtonDecimal_Click);
//
// cmdButtonOn
//
this.cmdButtonOn.Location = new System.Drawing.Point(10, 53);
this.cmdButtonOn.Name = "cmdButtonOn";
this.cmdButtonOn.Size = new System.Drawing.Size(55, 23);
this.cmdButtonOn.TabIndex = 20;
this.cmdButtonOn.Text = "ON";
this.cmdButtonOn.UseVisualStyleBackColor = true;
this.cmdButtonOn.Click += new System.EventHandler(this.cmdButtonOn_Click);
//
// cmdButtonDel
//
this.cmdButtonDel.Location = new System.Drawing.Point(68, 53);
this.cmdButtonDel.Name = "cmdButtonDel";
this.cmdButtonDel.Size = new System.Drawing.Size(75, 23);
this.cmdButtonDel.TabIndex = 18;
this.cmdButtonDel.Text = "DEL";
this.cmdButtonDel.UseVisualStyleBackColor = true;
this.cmdButtonDel.Click += new System.EventHandler(this.cmdButtonDel_Click);
//
// button17
//
this.button17.Location = new System.Drawing.Point(149, 53);
this.button17.Name = "button17";
this.button17.Size = new System.Drawing.Size(65, 23);
this.button17.TabIndex = 17;
this.button17.Text = "R";
this.button17.UseVisualStyleBackColor = true;
//
// txtInput
//
this.txtInput.Location = new System.Drawing.Point(10, 10);
this.txtInput.Multiline = true;
this.txtInput.Name = "txtInput";
this.txtInput.Size = new System.Drawing.Size(260, 37);
this.txtInput.TabIndex = 16;
this.txtInput.TextChanged += new System.EventHandler(this.txtInput_TextChanged);
//
// cmdButtonOff
//
this.cmdButtonOff.Location = new System.Drawing.Point(218, 53);
this.cmdButtonOff.Name = "cmdButtonOff";
this.cmdButtonOff.Size = new System.Drawing.Size(52, 23);
this.cmdButtonOff.TabIndex = 15;
this.cmdButtonOff.Text = "OFF";
this.cmdButtonOff.UseVisualStyleBackColor = true;
this.cmdButtonOff.Click += new System.EventHandler(this.cmdButtonOff_Click);
//
// cmdButtonDivision
//
this.cmdButtonDivision.Location = new System.Drawing.Point(215, 196);
this.cmdButtonDivision.Name = "cmdButtonDivision";
this.cmdButtonDivision.Size = new System.Drawing.Size(55, 23);
this.cmdButtonDivision.TabIndex = 14;
this.cmdButtonDivision.Text = "/";
this.cmdButtonDivision.UseVisualStyleBackColor = true;
this.cmdButtonDivision.Click += new System.EventHandler(this.cmdButtonDivision_Click);
//
// button14
//
this.button14.Location = new System.Drawing.Point(215, 236);
this.button14.Name = "button14";
this.button14.Size = new System.Drawing.Size(55, 23);
this.button14.TabIndex = 13;
this.button14.Text = "x";
this.button14.UseVisualStyleBackColor = true;
this.button14.Click += new System.EventHandler(this.cmdButtonMultip_Click);
//
// cmdButtonSubtr
//
this.cmdButtonSubtr.Location = new System.Drawing.Point(215, 276);
this.cmdButtonSubtr.Name = "cmdButtonSubtr";
this.cmdButtonSubtr.Size = new System.Drawing.Size(55, 23);
this.cmdButtonSubtr.TabIndex = 12;
this.cmdButtonSubtr.Text = "-";
this.cmdButtonSubtr.UseVisualStyleBackColor = true;
this.cmdButtonSubtr.Click += new System.EventHandler(this.cmdButtonSubtr_Click);
//
// cmdButtonAdd
//
this.cmdButtonAdd.Location = new System.Drawing.Point(215, 315);
this.cmdButtonAdd.Name = "cmdButtonAdd";
this.cmdButtonAdd.Size = new System.Drawing.Size(55, 23);
this.cmdButtonAdd.TabIndex = 11;
this.cmdButtonAdd.Text = "+";
this.cmdButtonAdd.UseVisualStyleBackColor = true;
this.cmdButtonAdd.Click += new System.EventHandler(this.cmdButtonAdd_Click);
this.cmdButtonAdd.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cmdButtonAdd_KeyPress);
//
// CmdButtonEqualto
//
this.CmdButtonEqualto.Location = new System.Drawing.Point(132, 315);
this.CmdButtonEqualto.Name = "CmdButtonEqualto";
this.CmdButtonEqualto.Size = new System.Drawing.Size(55, 23);
this.CmdButtonEqualto.TabIndex = 10;
this.CmdButtonEqualto.Text = "=";
this.CmdButtonEqualto.UseVisualStyleBackColor = true;
this.CmdButtonEqualto.Click += new System.EventHandler(this.CmdButtonEqualto_Click);
//
// ButtonfigureZero
//
this.ButtonfigureZero.Location = new System.Drawing.Point(10, 315);
this.ButtonfigureZero.Name = "ButtonfigureZero";
this.ButtonfigureZero.Size = new System.Drawing.Size(55, 23);
this.ButtonfigureZero.TabIndex = 9;
this.ButtonfigureZero.Text = "0";
this.ButtonfigureZero.UseVisualStyleBackColor = true;
this.ButtonfigureZero.Click += new System.EventHandler(this.myButton);
//
// Buttonfigurenine
//
this.Buttonfigurenine.Location = new System.Drawing.Point(132, 276);
this.Buttonfigurenine.Name = "Buttonfigurenine";
this.Buttonfigurenine.Size = new System.Drawing.Size(55, 23);
this.Buttonfigurenine.TabIndex = 8;
this.Buttonfigurenine.Text = "9";
this.Buttonfigurenine.UseVisualStyleBackColor = true;
this.Buttonfigurenine.Click += new System.EventHandler(this.myButton);
//
// Buttonfigureeight
//
this.Buttonfigureeight.Location = new System.Drawing.Point(71, 276);
this.Buttonfigureeight.Name = "Buttonfigureeight";
this.Buttonfigureeight.Size = new System.Drawing.Size(55, 23);
this.Buttonfigureeight.TabIndex = 7;
this.Buttonfigureeight.Text = "8";
this.Buttonfigureeight.UseVisualStyleBackColor = true;
this.Buttonfigureeight.Click += new System.EventHandler(this.myButton);
//
// Buttonfigureseven
//
this.Buttonfigureseven.Location = new System.Drawing.Point(10, 276);
this.Buttonfigureseven.Name = "Buttonfigureseven";
this.Buttonfigureseven.Size = new System.Drawing.Size(55, 23);
this.Buttonfigureseven.TabIndex = 6;
this.Buttonfigureseven.Text = "7";
this.Buttonfigureseven.UseVisualStyleBackColor = true;
this.Buttonfigureseven.Click += new System.EventHandler(this.myButton);
//
// Buttonfiguresix
//
this.Buttonfiguresix.Location = new System.Drawing.Point(132, 236);
this.Buttonfiguresix.Name = "Buttonfiguresix";
this.Buttonfiguresix.Size = new System.Drawing.Size(55, 23);
this.Buttonfiguresix.TabIndex = 5;
this.Buttonfiguresix.Text = "6";
this.Buttonfiguresix.UseVisualStyleBackColor = true;
this.Buttonfiguresix.Click += new System.EventHandler(this.myButton);
//
// Buttonfigurefive
//
this.Buttonfigurefive.Location = new System.Drawing.Point(71, 236);
this.Buttonfigurefive.Name = "Buttonfigurefive";
this.Buttonfigurefive.Size = new System.Drawing.Size(55, 23);
this.Buttonfigurefive.TabIndex = 4;
this.Buttonfigurefive.Text = "5";
this.Buttonfigurefive.UseVisualStyleBackColor = true;
this.Buttonfigurefive.Click += new System.EventHandler(this.myButton);
//
// Buttonfigurefour
//
this.Buttonfigurefour.Location = new System.Drawing.Point(10, 236);
this.Buttonfigurefour.Name = "Buttonfigurefour";
this.Buttonfigurefour.Size = new System.Drawing.Size(55, 23);
this.Buttonfigurefour.TabIndex = 3;
this.Buttonfigurefour.Text = "4";
this.Buttonfigurefour.UseVisualStyleBackColor = true;
this.Buttonfigurefour.Click += new System.EventHandler(this.myButton);
//
// Buttonfigurethree
//
this.Buttonfigurethree.Location = new System.Drawing.Point(132, 196);
this.Buttonfigurethree.Name = "Buttonfigurethree";
this.Buttonfigurethree.Size = new System.Drawing.Size(55, 23);
this.Buttonfigurethree.TabIndex = 2;
this.Buttonfigurethree.Text = "3";
this.Buttonfigurethree.UseVisualStyleBackColor = true;
this.Buttonfigurethree.Click += new System.EventHandler(this.myButton);
//
// Buttonfiguretwo
//
this.Buttonfiguretwo.Location = new System.Drawing.Point(71, 196);
this.Buttonfiguretwo.Name = "Buttonfiguretwo";
this.Buttonfiguretwo.Size = new System.Drawing.Size(55, 23);
this.Buttonfiguretwo.TabIndex = 1;
this.Buttonfiguretwo.Text = "2";
this.Buttonfiguretwo.UseVisualStyleBackColor = true;
this.Buttonfiguretwo.Click += new System.EventHandler(this.myButton);
//
// Buttonfigureone
//
this.Buttonfigureone.Location = new System.Drawing.Point(10, 196);
this.Buttonfigureone.Name = "Buttonfigureone";
this.Buttonfigureone.Size = new System.Drawing.Size(55, 23);
this.Buttonfigureone.TabIndex = 0;
this.Buttonfigureone.Text = "1";
this.Buttonfigureone.UseVisualStyleBackColor = true;
this.Buttonfigureone.Click += new System.EventHandler(this.myButton);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 404);
this.Controls.Add(this.cmdButtonSquarer);
this.Name = "Form1";
this.Text = "ToluCalculator";
this.Click += new System.EventHandler(this.myButton);
this.cmdButtonSquarer.ResumeLayout(false);
this.cmdButtonSquarer.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel cmdButtonSquarer;
private System.Windows.Forms.Button cmdButtonDel;
private System.Windows.Forms.Button button17;
private System.Windows.Forms.TextBox txtInput;
private System.Windows.Forms.Button cmdButtonOff;
private System.Windows.Forms.Button cmdButtonDivision;
private System.Windows.Forms.Button button14;
private System.Windows.Forms.Button cmdButtonSubtr;
private System.Windows.Forms.Button cmdButtonAdd;
private System.Windows.Forms.Button CmdButtonEqualto;
private System.Windows.Forms.Button ButtonfigureZero;
private System.Windows.Forms.Button Buttonfigurenine;
private System.Windows.Forms.Button Buttonfigureeight;
private System.Windows.Forms.Button Buttonfigureseven;
private System.Windows.Forms.Button Buttonfiguresix;
private System.Windows.Forms.Button Buttonfigurefive;
private System.Windows.Forms.Button Buttonfigurefour;
private System.Windows.Forms.Button Buttonfigurethree;
private System.Windows.Forms.Button Buttonfiguretwo;
private System.Windows.Forms.Button Buttonfigureone;
private System.Windows.Forms.Button CmdButtonDecimal;
private System.Windows.Forms.Button cmdButtonOn;
private System.Windows.Forms.Button cmdBtnSquarer;
}
}
Enjoy and hope this helps you solve one or two problems facing you.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

New Post

New style string formatting in Python

In this section, you will learn the usage of the new style formatting. Learn more here . Python 3 introduced a new way to do string formatti...