Okay in this program there's a translating part. Sounds pretty simple huh? well this won't work for some reason, and i want you to see what's wrong...
I'm getting it to find each word as it goes along, and i've only had one word put in so far just to test it out, Je ("I" in french)
VB Code:
Dim Length As Integer Dim x As Integer Dim y As Integer Dim word As String Dim sentence As String Dim xa As String Dim ya As String Private Sub Button1_Click(............) Handles Button1.Click sentence = "" Length = Len(TextBox1.Text) For x = 1 To Length xa = Mid(TextBox1.Text, 1, x) If xa = " " Then For y = 1 To x Step -1 ya = Mid(TextBox1.Text, x, 1) If ya = " " Then word = Mid(TextBox1.Text, y + 1, x - 1) If word = " Je " Then sentence = sentence + " I " TextBox2.Text = sentence End If End If Next End If Next End Sub End Class




Reply With Quote