Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim input As String
- input = CStr(TextBox1.Text)
- displayInColor(input)
- End Sub
- Sub displayInColor(word As String)
- If word.Length < 5 Then
- txtOutput.ForeColor = Color.Red
- txtOutput.Text = word
- Else
- txtOutput.ForeColor = Color.Green
- txtOutput.Text = word
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment