In this exercise, you modify the Gross Pay application from this chapter’s Focus lesson. Use Windows to make a copy of the Gross Solution folder. Rename the copy Gross Solution-Functions. Open the Gross Solution.sln file contained in the Gross Solution-Functions folder. Change the two independent Sub procedures to functions named GetWeekly and GetTwicePerMonth. Modify the code so that the btnCalc_Click procedure (rather than the two functions) displays the gross pay in the lblGross control. Save the solution and then start and test the application. Need this in VB please.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter6: Sub And Function Procedures
Section: Chapter Questions
Problem 3E
icon
Related questions
Question

In this exercise, you modify the Gross Pay application from this chapter’s Focus lesson. Use Windows to make a copy of the Gross Solution folder. Rename the copy Gross Solution-Functions. Open the Gross Solution.sln file contained in the Gross Solution-Functions folder. Change the two independent Sub procedures to functions named GetWeekly and GetTwicePerMonth. Modify the code so that the btnCalc_Click procedure (rather than the two functions) displays the gross pay in the lblGross control. Save the solution and then start and test the application. Need this in VB please.

Code given:

Option Explicit On
Option Strict On
Option Infer Off

Public Class frmMain
' Independent Sub procedures.

 

Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click
' Calls independent Sub procedures to calculate and display the gross pay.


End Sub

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

Private Sub txtSalary_Enter(sender As Object, e As EventArgs) Handles txtSalary.Enter
txtSalary.SelectAll()
End Sub

Private Sub ClearGross(sender As Object, e As EventArgs) Handles txtSalary.TextChanged, radWeekly.CheckedChanged, radTwicePerMonth.CheckedChanged
lblGross.Text = String.Empty
End Sub

Private Sub txtSalary_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtSalary.KeyPress
' Accept only numbers and the Backspace key

If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> ControlChars.Back Then
e.Handled = True
End If
End Sub

Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub
End Class

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Data Binding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage