Basic Calculator
Design Form
1. Insert Label ( For Result )
2. Insert Textbox ( For 1st Value )
3. Insert Textbox ( For 2nd Value )
4. Insert 4 Buttons ( +, - , * , / )
In code use label & textbox name.
As Shown Below
Button Code for + :
lblResult.Text = val(txt1.text) + val(txt2.text)
Button Code for - :
lblResult.Text = val(txt1.text) - val(txt2.text)
1. Insert Label ( For Result )
2. Insert Textbox ( For 1st Value )
3. Insert Textbox ( For 2nd Value )
4. Insert 4 Buttons ( +, - , * , / )
In code use label & textbox name.
As Shown Below
Button Code for + :
lblResult.Text = val(txt1.text) + val(txt2.text)
Button Code for - :
lblResult.Text = val(txt1.text) - val(txt2.text)
Button Code for * :
lblResult.Text = val(txt1.text) * val(txt2.text)
Button Code for / :
lblResult.Text = val(txt1.text) / val(txt2.text)
As Shown Below.
Run Program . . . . .
For Any Problem email me at intelligentprogrammer@gmail.com


Comments