Question
I am getting this error on line 12 Help Please!!!! Severity Code Description Project File Line Suppression State Error BC31029 Method 'Form1_Load' cannot handle event
I am getting this error on line 12 Help Please!!!! Severity Code Description Project File Line Suppression State Error BC31029 Method 'Form1_Load' cannot handle event 'Load' because they do not have a compatible signature.
Public Class Form1
'This application displays a sales report for the Demetris Leadership Program
'Class - level delarations
Const intMax_SUBSCRIPT As Integer = 4
Dim strProdNames(intMax_SUBSCRIPT) As String
Dim strDesc(intMax_SUBSCRIPT) As String
Dim intProdNums(intMax_SUBSCRIPT) As Integer
Dim decPrices(intMax_SUBSCRIPT) As Decimal
Dim intUnitsSold(intMax_SUBSCRIPT) As Integer
Private Sub Form1_Load(ByVal sender As System.Object) Handles MyBase.Load
'Initialize the arrays with product data
InitArrays()
End Sub
Private Sub InitArrays()
strProdNames(0) = "Six Steps to Leadership"
strDesc(0) = "Book"
intProdNums(0) = 914
decPrices(0) = 12.95D
strProdNames(1) = "Six Steps to Leadership"
strDesc(1) = "CD"
intProdNums(1) = 915
decPrices(1) = 14.95D
strProdNames(2) = "The Road to Excellence"
strDesc(2) = "Video"
intProdNums(2) = 916
decPrices(2) = 18.95D
strProdNames(3) = "Seven Lessons of Quality"
strDesc(3) = "Book"
intProdNums(3) = 917
decPrices(3) = 16.95D
strProdNames(4) = "Seven Lessons of Quality"
strDesc(4) = "CD"
intProdNums(4) = 918
decPrices(4) = 21.95D
End Sub
Private Sub mnuFileExit_Click(sender As Object, e As EventArgs) Handles mnuFileExit.Click
Me.Close()
End Sub
Private Sub mnuReportData_Click(sender As Object, e As EventArgs) Handles mnuReportData.Click
Dim intCount As Integer = 0
Do While intCount <= intMax_SUBSCRIPT
Try
intUnitsSold(intCount) = CInt(
InputBox("Enter units sold of product number " &
intProdNums(intCount)))
intCount += 1
Catch
MessageBox.Show("Enter a valid integer.")
End Try
Loop
End Sub
Private Sub mnuReportDisplay_Click(sender As Object, e As EventArgs) Handles mnuReportDisplay.Click
Dim intCount As Integer
Dim decRevenue As Decimal
Dim decTotalRevenue As Decimal
lstSalesData.Items.Add("SALES REPORT")
lstSalesData.Items.Add("-------------------")
For intCount = 0 To intMax_SUBSCRIPT
decRevenue = intUnitsSold(intCount) * decPrices(intCount)
lstSalesData.Items.Add("Product Number: " &
intProdNums(intCount))
lstSalesData.Items.Add("Name: " &
strProdNames(intCount))
lstSalesData.Items.Add("Description: " &
strDesc(intCount))
lstSalesData.Items.Add("Unit Price: " &
decPrices(intCount).ToString("c"))
lstSalesData.Items.Add("Units Sold: " &
intUnitsSold(intCount).ToString())
lstSalesData.Items.Add("Product Revenue: " &
decRevenue.ToString("c"))
lstSalesData.Items.Add("")
decTotalRevenue = decTotalRevenue + decRevenue
Next
lblTotalRevenue.Text = decTotalRevenue.ToString("c")
End Sub
Private Sub mnuAbout_Click(sender As Object, e As EventArgs) Handles mnuAbout.Click
MessageBox.Show("Displays a sales report for DLC.", "About")
End Sub
End Class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started