I have this code at button click:
[VBCODE]
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
If ListBox1.Select edIndex() Then
Dim lines As String() = File.ReadAllLin es(FileName, FileEncoding)
Dim Line As String = lines(Int(Rnd() * (UBound(lines) + 1)))
Dim Pos As Long = Line.IndexOf(" ")
TextBox1.Text = Line.Substring( 0, Pos)
TextBox2.Text = Line.Substring( Pos + 1, Line.Length - Pos - 1)
End If
End Sub
End Class
[/VBCODE]
which take words and set them in 2 textboxes,
I need that with the click on the button one word will still enter the textbox1 (thats o.k in that code), the user at that point will enter a word in textbox2 , and the program will check if he enters the correct word with the value of textbox2 (as is it in the code) , and shows msgbox as right or wrong,..
can anyone help me please with this thing, I've tried a lot of situations but when I push the button it generate the next 2 words into the textboxes , and don't considerate the entered value.. :confused:
it supposed to be a very simple "if condition" .