Write a Vb.net program to design following screen, accept the details from the user. Clicking on Submit button Net Salary should be calculated and displayed into the TextBox. Display the MessageBox informing the Name and Net Salary of employee.
Form:-
Program:-
Public Class slip7
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim cal, tax, bs, da, hra, ma, pf, pt, it As Integer
bs = CInt(TextBox2.Text)
da = CInt(TextBox3.Text)
hra = CInt(TextBox4.Text)
ma = CInt(TextBox5.Text)
pf = CInt(TextBox6.Text)
pt = CInt(TextBox7.Text)
it = CInt(TextBox8.Text)
cal = bs + ((da * bs) / 100) + ((hra * bs) / 100) + ((ma * bs) / 100)
tax = ((pt * bs) / 100) + ((it * bs) / 100) + ((pf * bs) / 100)
cal = cal - tax
TextBox9.Text = cal
MsgBox("Name: " + TextBox1.Text + " Net salary: " + TextBox9.Text)
End Sub
End Class
Output:-
Design:-
1) Take 9 TextBox, 9 Labels, Button, a panel on the design form.
2) Set Text on Button and Labels
Note - Set startup form's application type as Windows Form Application
0 Comments