Question: Code the reverse name button's click event procedure to display the name as follows: the last name followed by a comma, a space, and the

Code the reverse name button's click event procedure to display the name as follows: the last name followed by a comma, a space, and the first name.

Here is my code what am I missing?

Option Explicit On Option Strict On

Public Class MainForm

Private Sub reverseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles reverseButton.Click Dim fullname As String = nameTextBox.Text Dim index As Integer = fullname.IndexOf("") Dim firstname As String = fullname.Substring(0, index) Dim lastname As String = fullname.Substring(index + 1) nameLabel.Text = lastname & "," & lastname

End Sub

Private Sub exitButton_Click(sender As Object, e As EventArgs) Handles exitButton.Click Me.Close() End Sub

Private Sub nameTextBox_Enter(sender As Object, e As EventArgs) Handles nameTextBox.Enter nameTextBox.SelectAll() End Sub

Private Sub nameTextBox_TextChanged(sender As Object, e As EventArgs) Handles nameTextBox.TextChanged nameLabel.Text = String.Empty End Sub

End Class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!