Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please complete source code in Visual Basic. NET. Please include form and what e

ID: 3753012 • Letter: P

Question

Please complete source code in Visual Basic. NET.

Please include form and what each label, combo box, button, etc is named.

Please include lists, loops, and print preview and print document.

Video Bonanza Maintain a list of movie categories. Use a drop-down combo box to hold the movie types, keeping the list in. Comedy alphabetic order. Use buttons or menu choices to Add a Category, Remove a Category, Clear All Categories, Print the Category List, Display the Movie Category Count,Action and Exit. Include appropriate access keys on your form and/or menu items. The starting categories are . Horror Do not allow a blank type to be added to the list. Display an error message if the user selects Remove Display the printed output in the Print Preview di- without first selecting a movie category. Before clearing alog box. Include your name and a heading at the top the list, display a message box to confirm the operation. of the report.

Explanation / Answer

'code

Public Class Form1
Dim count As Integer = 0
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim category As String
category = InputBox("Enter a category")
If (category.Length() > 0) Then
ComboBox1.Items.Add(category)
count += 1
ComboBox1.Sorted = True
Else
MsgBox("Please don't enter empty string")
End If
End Sub

Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRemove.Click
If count = 0 Or ComboBox1.SelectedIndex = 0 Then
MsgBox("Please select a category in the list")
End If
ComboBox1.Items.RemoveAt(ComboBox1.SelectedIndex)
count -= 1
End Sub

Private Sub btnClearAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClearAll.Click
ComboBox1.Items.Clear()
count = 0
End Sub

Private Sub btnPrintList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintList.Click
Dim Msg As String = ""
For i = 1 To count
Msg = ComboBox1.Items(i)
Next
MsgBox(Msg)
End Sub

Private Sub btnCount_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCount.Click
MsgBox("Movie category count" & count)
End Sub

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
End
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("Comedy")
ComboBox1.Items.Add("Drama")
ComboBox1.Items.Add("Action")
ComboBox1.Items.Add("Sci-Fi")
count = 4
End Sub
End Class

'Design

'code

Public Class Form1
Dim count As Integer = 0
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim category As String
category = InputBox("Enter a category")
If (category.Length() > 0) Then
ComboBox1.Items.Add(category)
count += 1
ComboBox1.Sorted = True
Else
MsgBox("Please don't enter empty string")
End If
End Sub

Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRemove.Click
If count = 0 Or ComboBox1.SelectedIndex = 0 Then
MsgBox("Please select a category in the list")
End If
ComboBox1.Items.RemoveAt(ComboBox1.SelectedIndex)
count -= 1
End Sub

Private Sub btnClearAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClearAll.Click
ComboBox1.Items.Clear()
count = 0
End Sub

Private Sub btnPrintList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintList.Click
Dim Msg As String = ""
For i = 1 To count
Msg = ComboBox1.Items(i)
Next
MsgBox(Msg)
End Sub

Private Sub btnCount_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCount.Click
MsgBox("Movie category count" & count)
End Sub

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
End
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("Comedy")
ComboBox1.Items.Add("Drama")
ComboBox1.Items.Add("Action")
ComboBox1.Items.Add("Sci-Fi")
count = 4
End Sub
End Class

'Design

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote