i want to know about how to manipulation textbox to produce an arithmetic result

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kpomeru
    New Member
    • May 2010
    • 4

    #1

    i want to know about how to manipulation textbox to produce an arithmetic result

    ok lets say i have three buttons,
    button1.text = "+"
    button2.text = "9"
    button3.text = "="
    and a textbox.text = "0"

    if i click any of first two buttons, the .text value adds to textbox1.text

    say(0+9+9+9)

    how do i write my code under button3 that my result will output 27 on the textbox
  • Aimee Bailey
    Recognized Expert New Member
    • Apr 2010
    • 197

    #2
    Im gonna get told off again, but heres a very crude solution:

    Code:
    Dim v As New DataTable
    TextBox1.Text = v.Compute(TextBox1.Text, "")
    please note, this doesnt really do complicated sum's well, rather just basic maths.
    Last edited by Aimee Bailey; Jun 17 '10, 04:01 PM. Reason: Disclaimer of limited functionallity

    Comment

    • kpomeru
      New Member
      • May 2010
      • 4

      #3
      thanks Boss u rock, it worked, its just for basic calculations

      Comment

      Working...