Good Evening (Morning to others)

I would like to find how it would be possible to create a calculator with only one entry field, i have managed to make one with two entry fields resulting in a ([2LeftOperand] + [2RightOperand]) calculation...i have tried hiding the Right Text box, and even to set the opacity to 0.0000 but these result an minor complications, yes i am studying but and it is part of an assignment, but i would greatly appreciate any suggestions and if possible - maybe code snippets too...

Regards...:-/

That's your task not mine, but I'll give you a hint, declare two float objects op1 and op2, when user begins enter some numbers in the textbox (the only one) once s\he presses +, -, *, \ take the textbox.text value and assign it to the op1 then clear the textbox let him\her insert number in the textbox again until s\he presses = assign textbox.text to op2, according to the operation user entered evaluate op1 and op2...

Just adding to what ramy said, you will also need to change those strings into ints or doubles.

Ok, well basically i've done everything up to the point where i just need to know how to hide an integer value in a read only textbox???

After taking the value from the textbox, clear it
textbox.Text = null;

you can also clear it with this

textBox.Text = "";

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.