Wage Calculator using VB.Net 2010
Wage Calculator GUI running under Windows 7 64-bit OS |
The program consists of two GroupBox
that incorporates the input and output, respectively. The program runs
simply by plugging in your annual input which produces an output of
Monthly, Weekly and Daily Wage Income. The silver lining of this working
principle is describe from the below's source code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtGenerate.Click
userwage = BxUserwage.Text
Monthly.Text = "$" & Math.Round(userwage / 12, 2)
Weekly.Text = "$" & Math.Round(userwage / 52, 2)
Daily.Text = "$" & Math.Round(userwage / 365.25, 2)
If (userwage = "0") Then
MsgBox("Please input value higher then zero")
End If
End Sub
BxUserwage.Text, the Textfield input is deemed as the userwage from the described source code. Since the code is derived from the Button1_click, when the user hits the Button1 (Captioned as Calculate!). Userwage (the class dimension) derived from BxUserwage.Text is then converted to Text
"$" and the mathematical expression that divides the input to produce the output Math.Round(userwage / 12, 2).
An If Statement was also indicated which generates an Error via Message Box if the User inputs an integral value of 0:
If (userwage = "0") Then
MsgBox("Please input value higher then zero")
The program is free and open to Public. Download via:
0 comments :
Post a Comment