|
-
Mar 22nd, 2011, 12:58 PM
#1
Thread Starter
Junior Member
Equation Help ::: How to Concatenate a Equation and Answer to text Box
Hello Everyone,
In our school theres a programming class and the teachers gone for the week and the sub is starting to get very frustrated, so I offered to help in any way i can. I have never programmed Visual Basic but I have programmed Ms-Dos, Javascript, HTML, *.vbs, *.ahk, *.gml, and a variety of other languages.
The class is going to build a program that calculate how many rabbits are born in a family. So when they click the button it shows in a text box the actual equation and then the answer after the equal sign that where i assume concatenation comes in.
Here's the code I've thrown together for when the buttons pressed:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim RabitAmount As Integer
Dim ShowEquation As String
RabitAmount = TextBox1.Text
ShowEquation = "Textbox1.text * 4 = "
TextBox2.Text = ShowEquation
TextBox2.Text = ((RabitAmount) * 4)
End Sub
End Class
I got the equation to answer it self and show in the text box but it won't show the equation before hand can you please let me know what i'm doing wrong and how to fix it?
Thanks,
-PsycoZL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|