You are on page 1of 2

Public Class Form1 Dim i As Integer Dim fr, xf, nf As String Private Sub Button1_Click(ByVal sender As System.

Object, ByVal e As System.EventArgs) Handles Button1.Click Label2.Text = Len(TextBox1.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ListBox1.Items.Clear() fr = (TextBox1.Text) For i = 1 To Len(fr) xf = Mid(fr, i, 1) ListBox1.Items.Add(xf) Next End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click ListBox1.Items.Clear() fr = TextBox1.Text For i = 1 To Len(fr) xf = Mid(fr, i, 1) If xf = Space(1) Then nf = Mid(fr, 1, i - 1) ListBox1.Items.Add(nf) Exit For End If Next End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click ListBox1.Items.Clear() fr = (TextBox1.Text) For i = 1 To Len(fr) xf = Mid(fr, 1, i) ListBox1.Items.Add(xf) Next End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click ListBox1.Items.Clear() fr = TextBox1.Text For i = 1 To Len(fr) xf = Mid(fr, i, 1) ListBox1.Items.Add(Space(i) & xf) Next

End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click End End Sub End Class

You might also like