Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with the following Visual Basic Script is Windows Forms App (.NET Framework 4.7.2) Change the Do clause to use the While keyword

I need help with the following

Visual Basic Script is Windows Forms App (.NET Framework 4.7.2)

Change the Do clause to use the While keyword rather than the Until keyword. If the counter contains the number 0, display a message informing the user that no sales amounts were entered. Display the message in a message box. After displaying the average sales amount, change the lblAvg controls BorderStyle property to BorderStyle.None, blink the text in the control five times, and then change the BorderStyle property back to BorderStyle.FixedSingle.

image text in transcribed

image text in transcribed

Project Build Debug Test Analyze Tools Extensions Search... Sale...tion - 0 X! File Edit View Window Help 10 . 12 2. - Debug -Any CPU = = = = 16 Live Share gr Data Sources Toolbox Solution Explorer Notifications Properties Property Manager frm Main.vb* + X frmMain.vb (Design)* VB Sales Express Project - .btnCalc - 4 Click 1 ' Name: Sales Express Project | Purpose: Display the average sales amount 1 Programmer: Jimmy C. Brown on 7 Feb 2020 1 reference Public class FrmMain O references Private Sub BtnExit Click(sender As Object, e As EventArgs) Handles btnExit.click : : Me.Close() End Sub O references Private Sub BtnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.click calculates and displays the average sales amount Const strPROMPT As String = "Enter a sales amount. Click Cancel to end." Const strTITLE As String = "Sales Entry" Dim strInputSales As String Dim intNumSales As Integer 'counter Dim decTotalSales As Decimal 'accumulator Dim decSales As Decimal Dim decAvg As Decimal 'initialize counter and accumulator intNumSales = 0 decTotalSales = 0 'get the first sales amount strInputSales = InputBox(strPROMPT, strTITLE, "0.00") Do While strInputSales = String. Empty Decimal.TryParse(strInputSales, decsales) decTotalSales - decTotalSales + decsales intNumSales = intNumSales + 1 'get another sales amount strInputSales = InputBox(strPROMPT, strTITLE, "0.00") Loop If intNumSales Then decAvg = decTotalSales / intNumSales End If IblAvg. Text = decAvg. ToString("c2") End Sub 36 End Class 110% . No issues found Ln: 18 Ch: 44 SPC CRLF Error List Output -0- 1 Add to Source Control - - M Build View Window Debug Format Test Analyze Tools Search... Sale...tion - 0 M File Edit Extensions 10: 0 X Project Help 2 2.S - Debug -Any CPU = Live Share & D L = frmMain.vb* frm Main.vb [Design]* x Data Sources Toolbox Sales Express Average sales amount: O...... ..... Solution Explorer Notifications Properties Property Manager Calculate Error List Output O Ready 1 Add to Source Control - - Project Build Debug Test Analyze Tools Extensions Search... Sale...tion - 0 X! File Edit View Window Help 10 . 12 2. - Debug -Any CPU = = = = 16 Live Share gr Data Sources Toolbox Solution Explorer Notifications Properties Property Manager frm Main.vb* + X frmMain.vb (Design)* VB Sales Express Project - .btnCalc - 4 Click 1 ' Name: Sales Express Project | Purpose: Display the average sales amount 1 Programmer: Jimmy C. Brown on 7 Feb 2020 1 reference Public class FrmMain O references Private Sub BtnExit Click(sender As Object, e As EventArgs) Handles btnExit.click : : Me.Close() End Sub O references Private Sub BtnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.click calculates and displays the average sales amount Const strPROMPT As String = "Enter a sales amount. Click Cancel to end." Const strTITLE As String = "Sales Entry" Dim strInputSales As String Dim intNumSales As Integer 'counter Dim decTotalSales As Decimal 'accumulator Dim decSales As Decimal Dim decAvg As Decimal 'initialize counter and accumulator intNumSales = 0 decTotalSales = 0 'get the first sales amount strInputSales = InputBox(strPROMPT, strTITLE, "0.00") Do While strInputSales = String. Empty Decimal.TryParse(strInputSales, decsales) decTotalSales - decTotalSales + decsales intNumSales = intNumSales + 1 'get another sales amount strInputSales = InputBox(strPROMPT, strTITLE, "0.00") Loop If intNumSales Then decAvg = decTotalSales / intNumSales End If IblAvg. Text = decAvg. ToString("c2") End Sub 36 End Class 110% . No issues found Ln: 18 Ch: 44 SPC CRLF Error List Output -0- 1 Add to Source Control - - M Build View Window Debug Format Test Analyze Tools Search... Sale...tion - 0 M File Edit Extensions 10: 0 X Project Help 2 2.S - Debug -Any CPU = Live Share & D L = frmMain.vb* frm Main.vb [Design]* x Data Sources Toolbox Sales Express Average sales amount: O...... ..... Solution Explorer Notifications Properties Property Manager Calculate Error List Output O Ready 1 Add to Source Control

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

Students also viewed these Databases questions