VB Exercise 5.2 - Exercise 5-2.In this exercise we were...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Exercise 5-2 ….In this exercise we were asked to request a speed value from the user by displaying an input box. When the user enters the speed and the input box closes, a second input box opens to request a distance. The speed and time are then multiplied to calculate distance over the time interval. Start Program Code Imports Microsoft.VisualBasic.ControlChars 'connects to library Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ProgClear() 'Clears the Text Box and inputs Instruction text End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close() 'Stop Profram and Close the Form End Sub Sub ProgClear() 'Method for clearing the Main Text Box 'and input instruction text for the user txtMain.Clear() 'Clear the Main Text Box End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 3

VB Exercise 5.2 - Exercise 5-2.In this exercise we were...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online