[go: up one dir, main page]

0% found this document useful (0 votes)
13 views3 pages

Hands-On Tutorial: User Input/Output: How-To: Use Visual Basic Inputbox and Messagebox Functions

This document provides a hands-on tutorial for using Visual Basic's InputBox and MessageBox functions to get user input and display output. It demonstrates how to create a simple temperature conversion application with a button that uses InputBox to get Celsius input from the user, performs the Fahrenheit conversion calculation, and displays the result using MessageBox. The tutorial walks through adding the necessary code, variables, logic, and controls to the application and shows the output when it is run.

Uploaded by

Janeth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Hands-On Tutorial: User Input/Output: How-To: Use Visual Basic Inputbox and Messagebox Functions

This document provides a hands-on tutorial for using Visual Basic's InputBox and MessageBox functions to get user input and display output. It demonstrates how to create a simple temperature conversion application with a button that uses InputBox to get Celsius input from the user, performs the Fahrenheit conversion calculation, and displays the result using MessageBox. The tutorial walks through adding the necessary code, variables, logic, and controls to the application and shows the output when it is run.

Uploaded by

Janeth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Hands-On Tutorial: User Input/Output

 How-to: Use Visual Basic InputBox and MessageBox Functions


1. Create a new Visual Basic project named VisualBasicIntro.

2. Add a new Button control to the default form. Set the Text property of the
button to “Temperature Conversion” and name it, cmdConvert. Use the
GroupBox control with no text value around the Button control.

User Input/Output: Design Window

11
Adding Code Using the Code Window
3. Double-click the Button control to open the Code Window with the
cmdConvert _Click subroutine.

4. Declare the variables TemperatureC and TemperatureF as Integers, and


write conversion logic as shown below.

User Input/Output: Code Window

12
Saving and Running the Application
5. Save and run the application to view the output shown below.

User Input/Output: Application Output

13

You might also like