Question

In: Computer Science

Please note: This is in Visual Basic. Create an application. Add a text box, a label,...

Please note: This is in Visual Basic.

Create an application. Add a text box, a label, and a button to the form. If the user enters a number that is greater than 100 in the text box, the button's "click" event procedure should display the result of multiplying the number by 5. Otherwise, it should display the result of dividing the number by 5. Code the procedure.

Solutions

Expert Solution

Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btn_Result.Click
Dim number As Integer

number = Convert.ToInt16(txtInput.Text)
If (number > 100) Then
lbl_output.Text = "Multiplying the " & number & " by " & 5 & " and the result is " & number * 5
Else
lbl_output.Text = "Dividing the " & number & " by " & 5 & " and the result is " & number / 5
End If

End Sub
End Class


Related Solutions

Please note: This is in Visual Basic. Create an application. Add two text boxes, a label,...
Please note: This is in Visual Basic. Create an application. Add two text boxes, a label, and a button to the form. The button’s Click event procedure should assign the contents of the text boxes to Double variables named dblNum1 and dblNum2. It then should divide the dblNum1 variable’s value by the dblNum2 variable’s value, assigning the result to a Double variable named dblAnswer. Display the answer in the label. Code the procedure. Save the solution and then start the...
NOTE: This is done using Visual Basic. Create an application named You Do It 2. Add...
NOTE: This is done using Visual Basic. Create an application named You Do It 2. Add a text box, a label, and a button to the form. Enter the following three Option statements above the Public Class clause in the Code Editor window: Option Explicit On, Option Strict Off, and Option Infer Off. In the button’s Click event procedure, declare a Double variable named dblNum. Use an assignment statement to assign the contents of the text box to the Double...
NOTE: This is done using Visual Basic. Create an application named You Do It 1. Add...
NOTE: This is done using Visual Basic. Create an application named You Do It 1. Add a text box, a label, and a button to the form. The button’s Click event procedure should store the contents of the text box in a Double variable named dblCost. It then should display the variable’s contents in the label. Enter the three Option statements above the Public Class clause in the Code Editor window, and then code the procedure. Save the solution and...
This is done using Visual Basic. Add three text boxes and three buttons to the form....
This is done using Visual Basic. Add three text boxes and three buttons to the form. Set the second and third text boxes' Multiline, ReadOnly, and ScrollBars properties to True, True, and Vertical, respectively. The user will enter a number in the first text box and them click the first button. The first buttons click event procedure should write the number on a seperate line in a sequential access file. The second button's click event procedure should read the entire...
Program on Visual Basic, VBA Create an application that lets the user enter a number of...
Program on Visual Basic, VBA Create an application that lets the user enter a number of seconds and produces output according to the following criteria: There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds. There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or...
Visual Basic Your first job is to create a visual basic project that will display the...
Visual Basic Your first job is to create a visual basic project that will display the name and telephone number for the contact person for the customer relations, marketing, order processing, and shipping departments. Include a button for each department. When the user clicks on the button for a department the program(in code for specific button will display the name and telephone number for the contact person in two labels. The same two labels will be used for each department...
Basic Pass Level Requirements - 53 Your extended Text Based Music Application must add the following...
Basic Pass Level Requirements - 53 Your extended Text Based Music Application must add the following functionality: Display a menu that offers the user the following options: 1. Read in Albums 2. Display Albums 3. Select an Album to play 4. Update an existing Album 5. Exit the application Menu option 1 should prompt the user to enter a filename of a file that contains the following information: ·The number of albums ·The first album name ·The first artist name...
windows forms Application using Visual Basic use visual basic 2012 Part 1: Programming – Income Tax...
windows forms Application using Visual Basic use visual basic 2012 Part 1: Programming – Income Tax Application 1.1 Problem Statement Due to upcoming end of financial year, you are being called in to write a program which will read in a file and produce reports as outlined. Inputs: The input file called IncomeRecord.txt contains a list of Annual income records of employees in a firm. Each record is on a single line and the fields are separated by spaces. The...
Windows Forms application using Visual Basic: Create a class called Character that a role-playing game might...
Windows Forms application using Visual Basic: Create a class called Character that a role-playing game might use to represent a character within the game. A character should include six stats as instance variables – strength, dexterity, constitution, intelligence, wisdom and charisma (all types are int). Your class should have a constructor that initializes these six instance variables. Provide Properties with an appropriate set and get block for each instance variable. In addition, provide a method named getStatsTotal that calculates the...
Make a Console application Language should be Visual Basic In this assignment, you will be calculating...
Make a Console application Language should be Visual Basic In this assignment, you will be calculating the two parts for each month. you calculate the interest to pay each month and principal you pay every month. The interest you pay every month = loan * monthlyInterest The principal you pay every month = monthlyMortgage -  interest you pay every month ' what is my remaining loan loan = loan - principal you pay every month Problem 1 : Using While Loop,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT