must be visual basic code please include any properties that have to be changed.
Below is the solution:
frmMain.vb
Public Class frmMain
'Create a array list and initialize
Dim lNumbers As List(Of Integer) = New List(Of
Integer)
Dim score As Integer
Dim totalScore As Integer
Dim scoreCount As Integer
Dim average As Double
Private Sub frmMain_Load(sender As Object, e As
EventArgs) Handles MyBase.Load
CenterToScreen()
End Sub
Private Sub btnExit_Click(sender As Object, e
As EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub btnAdd_Click(sender As Object, e
As EventArgs) Handles btnAdd.Click
'check for the invalid
entry
If Not
(Integer.TryParse(txtScore.Text, score)) Then
MessageBox.Show("Invalid score")
ElseIf Not
(Integer.TryParse(txtTotalScore.Text, totalScore)) Then
MessageBox.Show("Invalid total score")
ElseIf Not
(Integer.TryParse(txtScoreCount.Text, scoreCount)) Then
MessageBox.Show("Invalid score count")
ElseIf Not
(Integer.TryParse(txtAverage.Text, average)) Then
MessageBox.Show("Invalid average")
Else
If lNumbers.Count - 1 < 20 Then
lNumbers.Add(score) 'added the value to the list
MessageBox.Show("Added")
Else
MessageBox.Show("cannot insert more than 20 value in array")
End If
End If
End Sub
Private Sub btnClearScores_Click(sender As
Object, e As EventArgs) Handles btnClearScores.Click
'clear the all text
field and the array list
txtScore.Text = ""
txtScoreCount.Text =
""
txtTotalScore.Text =
""
txtAverage.Text =
""
lNumbers.Clear()
End Sub
Private Sub btnDisplayScores_Click(sender As
Object, e As EventArgs) Handles btnDisplayScores.Click
lNumbers.Sort() 'sort
the list
Dim obj As New
frmSortedScore 'create object to display value to another
form
obj.score = lNumbers
'send the value to another form
obj.Show() 'show the
form
End Sub
End Class
frmSortedScore.vb
Public Class frmSortedScore
Public Property score As List(Of Integer)
Private Sub frmSortedScore_Load(sender As
Object, e As EventArgs) Handles MyBase.Load
lblScore.Text = ""
For i = 0 To score.Count
- 1
lblScore.Text &= score(i).ToString &
Environment.NewLine
Next
End Sub
Private Sub btnOK_Click(sender As Object, e
As EventArgs) Handles btnOK.Click
Me.Close()
End Sub
End Class
output:
must be visual basic code please include any properties that have to be changed. rcises-3.pdf -...
Visual Studio Code C# Well Document everyline saying what the code does. Include designer code and .cscode Extra 6-1 Create a simple calculator In this exercise, you'l1 create a form that accepts two operands and an operator from the user and then performs the requested operation. Simple Calculator Operand 1: 86 Operator Operand 2 11.11 Resut 7.7408 1. Start a new project named SimpleCalculator in the Extra Exercises Chapter 06SimpleCalculator directory 2. Add labels, text boxes, and buttons to the...
Visual Basic 2015: Extra 18-1 Use inheritance with the Inventory Maintenance Application Source Code: 1. frmNewItem.vb Public Class frmNewItem Public InvItem As InvItem Private Sub frmNewItem_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.LoadComboBox() End Sub Private Sub LoadComboBox() cboSizeOrManufacturer.Items.Clear() If rdoPlant.Checked Then cboSizeOrManufacturer.Items.Add("1 gallon") cboSizeOrManufacturer.Items.Add("5 gallon") cboSizeOrManufacturer.Items.Add("15 gallon") cboSizeOrManufacturer.Items.Add("24-inch box") cboSizeOrManufacturer.Items.Add("36-inch box") Else cboSizeOrManufacturer.Items.Add("Bayer") cboSizeOrManufacturer.Items.Add("Jobe's") cboSizeOrManufacturer.Items.Add("Ortho") cboSizeOrManufacturer.Items.Add("Roundup") cboSizeOrManufacturer.Items.Add("Scotts") End If End Sub Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click If IsValidData() Then InvItem = New InvItem(CInt(txtItemNo.Text),...