I'm learning and I am stuck on how to do the following: Once the average is displayed in lblAvg.Text, I need to make lblAvg.Borderstyle = BorderStyle.None, then make the text blink five times, and then return lblAvg.BorderStyle = FixedSingle. I am lost on how to make this happen. Here is the syntax that I have for the Visual Basic Exercise:
PrivateSubbtnCalc_Click(senderAsObject, eAsEventArgs)HandlesbtnCalc.Click
' calculates and displays the average sales amount
ConststrPROMPTAsString=
"Enter a Sales Amount. Click Cancel to End."
ConststrTITLEAsString="Sales Entry"
DimstrInputSalesAsString
DimintNumSalesAsInteger'Counter
DimdecTotalSalesAsDecimal'Accumulator
DimdecSalesAsDecimal
DimdecAverageAsDecimal
' initialize counter and accumulator
intNumSales = 0
decTotalSales = 0
' InputBox First Sales Amount
strInputSales = InputBox(strPROMPT, strTITLE, "0.00")
DoWhileNotstrInputSales = String.Empty
Decimal.TryParse(strInputSales, decSales)
decTotalSales = decTotalSales + decSales
intNumSales = intNumSales + 1
IfstrInputSales = 0Then
MessageBox.Show("Please Enter a Valid Sales Amount",
"No Sales Amount Has Been Entered", MessageBoxButtons.OK,
MessageBoxIcon.Information)
EndIf
' get another sales amount
strInputSales =
InputBox(strPROMPT, strTITLE, "0.00")
Loop
IfintNumSales <> 0Then
decAverage = decTotalSales / intNumSales
EndIf
lblAvg.Text = decAverage.ToString("C2")
EndSub