Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
Expert Solution & Answer
Book Icon
Chapter 3, Problem 2MQ9

Explanation of Solution

Enter event:

Enter event is an action which is raised by any of the following ways:

  • While using the Focus() method, the textbox control receives the focus.
  • While tabbing to the control or using the control access key, the textbox receives the focus.

Example:

Double click on the “Convert to Uppercase” button, and add the following code in the code window:

Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConvert.Click

        'Displays the City in uppercase

        lblUppercase.Text = txtCity.Text.ToUpper

Set the focus to the text box if the user needs to enter the new text.

        'Set the focus to the txtCity control

        txtCity.Focus()

    End Sub

Double click on the “txtCity” text box, change the event to “Enter”, and then add the following code in the code window:

Private Sub txtCity_Enter(ByVal sender As System...

Blurred answer
Students have asked these similar questions
When does a text box’s Enter event occur?
You should enters a number that is outside the range of 1 through 7.
Option buttons let the user no select from one of several choices. * True False

Chapter 3 Solutions

Programming with Microsoft Visual Basic 2017

Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning