stefan1919

SubProcedure

Oct 6th, 2015
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  4.         Dim input As String
  5.         input = CStr(TextBox1.Text)
  6.         displayInColor(input)
  7.     End Sub
  8.     Sub displayInColor(word As String)
  9.         If word.Length < 5 Then
  10.             txtOutput.ForeColor = Color.Red
  11.             txtOutput.Text = word
  12.         Else
  13.             txtOutput.ForeColor = Color.Green
  14.             txtOutput.Text = word
  15.         End If
  16.     End Sub
  17. End Class
Advertisement
Add Comment
Please, Sign In to add comment