This Visual Basic code defines a class with a button click event handler that takes user input from an input box. It splits the input into an array of words, iterates through each word to extract the first letter, concatenates the letters into a new string, converts it to uppercase, and displays it on a label when the button is clicked.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
80 views1 page
Exercise 10
This Visual Basic code defines a class with a button click event handler that takes user input from an input box. It splits the input into an array of words, iterates through each word to extract the first letter, concatenates the letters into a new string, converts it to uppercase, and displays it on a label when the button is clicked.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click Dim question As String = InputBox("Enter words to create a acrynom") Dim spliter As String() = question.Split(" ") Dim counter As Integer = 0 Dim all As String = "" While counter < spliter.Length Dim change As String = spliter(counter) all = all + change.Substring(0, 1) counter = counter + 1 End While Label1.Text = Label1.Text + " " + all.ToUpper End Sub End Class