Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Clearly Visual Basic programming with Microsoft 2012 3rd edition Chapter 11 exercise 4, page 259 Needing some help with this Exercise. Exercise 4 open Sunshine

Clearly Visual Basic programming with Microsoft 2012 3rd edition

Chapter 11 exercise 4, page 259

Needing some help with this Exercise.

Exercise 4

open Sunshine solution (Sunshine Solution.sln) file contained in the ClearlyVB2012\Chap11\SunshineSolution folder. Change the text box's MaxLength property to 1. Change its CharacterCasing Property to Upper. Open code editor window. The text box should accept only backspace key and the letters A,a,B and b. If the user clicks the display button without entering a code, the selection structure should display the text "Not available" in the lblName control. it also should display a message box that contains the "Please enter a code" message, the text "Department Codes" in the title bar, an OK button, and an Information icon. Make the appropriate modifications to the code. Create a test data chart using the guidelines from Figure 11-1 and the application's interface and code.

' Name: Sunshine Project ' Purpose: Display the name of the department ' corresponding to a code ' Programmer: on

Public Class frmMain

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

Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click ' displays the department name

Dim strCode As String

' assign user input to a variable strCode = txtCode.Text

' display department name Select Case strCode Case "A" lblName.Text = "Accounting" Case "B" lblName.Text = "Inventory" End Select 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

More Books

Students also viewed these Databases questions

Question

Design a health and safety policy.

Answered: 1 week ago