Public Class procstring Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged Dim str As String = TextBox1.Text Dim len As Integer = str.Length Dim cnt As Integer = Math.Min(len, 5) ListBox1.Items.Clear() ListBox1.Items.Add("a. " & str.Substring(0, cnt)) ListBox1.Items.Add("b. " & str.Substring(len - cnt)) ListBox1.Items.Add("c. " & str.Substring((len - cnt) \ 2, cnt)) ListBox1.Items.Add("d. " & str.Contains("str")) ListBox1.Items.Add("e. " & str.ToUpper()) ListBox1.Items.Add("f. " & str.Replace(" is ", " is not ")) End Sub End Class