0

hi i'm anousha and i have a big problem ive an aasignment to create a calculator in VB.net to prfrom addition and subtraction then show the results using mouse controls. Can you give me a hit how to do it plz?

5
Contributors
4
Replies
12
Views
10 Years
Discussion Span
Last Post by Reverend Jim
0

<form> <p><input type="text" name="result" size="20" style="text-align:right"> <input type="hidden" name="buffer" size="20"></p> <p> <input type="button" value="1" onclick="result.value+=1"> <input type="button" value="2" onclick="result.value+=2"> <input type="button" value="3" onclick="result.value+=3"> <input type="button" value="+" onclick="buffer.value+=result.value+'+';result,value=' ' "> </p> <p> <input type="button" value="4" onclick="result.value+=4"> <input type="button" value="5" onclick="result.value+=5"> <input type="button" value="6" onclick="result.value+=6"> <input type="button" value="-" onclick="buffer.value+=result.value+'-';result,value=' ' "> </p> <p> <input type="button" value="7" onclick="result.value+=7"> <input type="button" value="8" onclick="result.value+=8"> <input type="button" value="9" onclick="result.value+=9"> <input type="button" value="" onclick="buffer.value+=result.value+'';result,value=' ' "> </p> <p> <input type="button" value="0" onclick="result.value+=0"> <input type="button" value="C" onclick="result.value=' ';buffer.value=' ' "> <input type="button" value="=" onclick="result.value=eval(buffer.value+result.value);buffer.value=' ';"> <input type="button" value="/" onclick="result.value=eval buffer.value+=result.value+'/';result.value=' ' "> </p> </form>

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.