Question
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:
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started