pls Help me
Code to manipulate numbers and display in textBox
Sir, I am in the task of creating a Windows Form Calculator. I want formula to manipulate and Display numbers in textbox.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pankaj PandeyRank #642 · 3.7K reputationPosted May 13, 2013, 4:44 AM EDT
i a, getting a little what you need.
try below code it is for only two number multiplication or other actions.
Mark as answered if helpfull
Textbox1.Text=result.tostring();
Pankaj PandeyRank #642 · 3.7K reputationPosted May 13, 2013, 1:47 AM EDT
Kindly explain your que a little more.
I Didn't get your actual requirment.
thanks
Bineesh ViswanathRank #1,681 · 907 reputationPosted May 13, 2013, 2:29 AM EDT
I am using only one textbox. I want to perform all functions which a calculator does.
I passed the button value to textbox.
but i can't write code for addition, multiplication,division and subtraction of two numbers.
Help me to find the formula to Calculate and Display the result in same Textbox.
Pankaj PandeyRank #642 · 3.7K reputationPosted May 13, 2013, 5:15 AM EDT
You can also use switch-case on place of if-control statement in my given code.
thanks
Bineesh ViswanathRank #1,681 · 907 reputationPosted May 13, 2013, 10:54 PM EDT
anyway thank you for the solution.
Pankaj PandeyRank #642 · 3.7K reputationPosted May 13, 2013, 11:24 PM EDT
you can put this code at button event which do you want to show result. just like window calculater programm.
Bineesh ViswanathRank #1,681 · 907 reputationPosted May 14, 2013, 2:05 AM EDT
using System;
Pankaj PandeyRank #642 · 3.7K reputationPosted May 14, 2013, 4:48 AM EDT
good to see that you got code.
thanks