Help with palindrome code
Private Sub btnTest_Click(sender As System.Object, e As System.EventArgs) Handles btnTest.Click
Dim Foreward As String = txtInput.Text
Dim Backward As String
Backward = StrReverse(Foreward)
txtInput.Text = Backward
If Backward = Foreward Then
MsgBox("TRUE, you have a palindrome")
MsgBox("FALSE, you do not have a palindrome")
Instead of message boxes I have two text boxes one where the user inputs a word or words and then they click a button to test if it's a palindrome or not. So how would I code it to post the "you/you do not have a palindrome in the second textbox?
Are you asking how to enter those messages into a textbox rather than by using message boxes? Because if you are, you can change the text property of the textbox using
textbox2.text = "You/you do not have a palindrome"
in place of the messageboxes.
You can change the property of any control using the name of the control, followed by .(property) = ...