VB .NET
Slip7
Q.1) 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. [Marks 20]
Solution
Public Class Slip7
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox9.Text = Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text) + Val(TextBox5.Text) + Val(TextBox6.Text) - Val(TextBox7.Text) - Val(TextBox8.Text)
MsgBox(TextBox1.Text & TextBox9.Text)
End Sub
End Class
Tags:
VB .NET