Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalc
ID: 3541352 • Letter: P
Question
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
'intlare variables for the calculation
Dim intTicketsSoldA As Integer
Dim intTicketsSoldB As Integer
Dim intTicketsSoldC As Integer
lblStatus.Text = String.Empty
Try
'Get the Tickets sold for each one
intTicketsSoldA = CDec(txtClassA.Text)
intTicketsSoldB = CDec(txtClassB.Text)
intTicketsSoldC = CDec(txtClassC.Text)
'Calculate Revenue for each one
lblClassA.Text = intTicketsSoldA * 15
lblClassB.Text = intTicketsSoldB * 12
lblClassC.Text = intTicketsSoldC * 9
'Calculate Total revenue
lblTotalRevenue.Text = (intTicketsSoldA * 15) + (intTicketsSoldB * 12) + (intTicketsSoldC * 9)
Catch ex As Exception
lblStatus.Text = ex.Message
End Try
End Sub
Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click
'Clear Tickets sold
txtClassA.Clear()
txtClassB.Clear()
txtClassC.Clear()
'Clear the Revenue generated
lblClassA.Text = String.Empty
lblClassB.Text = String.Empty
lblClassC.Text = String.Empty
lblTotalRevenue.Text = String.Empty
'Reset the focus to the first field
txtClassA.Focus()
'Reset Error message
lblStatus.Text = String.Empty
End Sub
Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click
'Close the form
Me.Close()
End Sub
End Class
It works but status strip is does not change at all.....
Three error found and have no clue about them
Warning 1 Namespace or type specified in the Imports 'System.Runtime.deceropServices' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:UsersDocumentsVisual Studio 2012ProjectsWindowsApplication1WindowsApplication1My ProjectAssemblyInfo.vb 3 9 stadiumSeating
Error 2 Type 'ComVisible' is not defined. C:UsersDocumentsVisual Studio 2012ProjectsWindowsApplication1WindowsApplication1My ProjectAssemblyInfo.vb 18 12 stadiumSeating
Error 3 'Guid' cannot be used as an attribute because it is not a class. C:Usersmitul_000DocumentsVisual Studio 2012ProjectsWindowsApplication1WindowsApplication1My ProjectAssemblyInfo.vb 21 2 stadiumSeating
Explanation / Answer
I am a professional and dedicated tutor,i would like to help you in your recent posted assignment with 100% assurance of quality and plagiarism free work with the provision of timely delivery of work. Warmly looking for your positive response.... Regard Thanks please contact at landerkelly50@gmail.com
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.