Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago