Programming with Microsoft Visual Basic 2015 (MindTap Course List)
Programming with Microsoft Visual Basic 2015 (MindTap Course List)
7th Edition
ISBN: 9781285860268
Author: Diane Zak
Publisher: Cengage Learning
Question
Book Icon
Chapter 4.LA, Problem 19E

a.

Program Plan Intro

Character Casting

Program plan:

  • Create new Windows Forms Application.
  • Design the form by placing the labels, textbox, and button and then change their name and properties.
  • Inside the “Display” button,
    • Declare required variables.
    • Get the “ID” from the user.
    • Check the “ID”.
      • Print the message.
      • Otherwise, print the corresponding message.
  • Inside the “Clear” button,
    • Clear the form.
  • Inside the “Exit” button,
    • Close the form.

b.

Explanation of Solution

Program:

'Definition of frmMain

Public Class frmMain

  'Definition of button display

Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click

  'Declare the ID as string

  Dim ID As String

  'Get the ID

  ID = txtId.Text

  'Check the ID

If ID = "AB12" OrElse ID = "XY59" OrElse ID = "TV45" Then

  'Print the message

  lblMsg.Text = "Valid ID"

  Else

  'Otherwise, print the message

  lblMsg...

Blurred answer
Students have asked these similar questions
List down the strenghts and weaknesses of your team project for Capsim Simulation? Explan.
Capsim Team PowerPoint Presentations - Slide Title: Key LearningsWhat were the key learnings that you discovered as a team through your Capsim simulation?
Write the SQL code that permits to implement the tables: Student and Transcript. NB: Add the constraints on the attributes – keys and other.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT