-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstudent_marks.vb
59 lines (44 loc) · 1.62 KB
/
student_marks.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Public Class student_marks
'Private Sub calculate()
'Dim total As Double
' total = Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text)
' TextBox5.Text = total
' TextBox6.Text = total / 3
'If Val(TextBox2.Text) >= 40 And Val(TextBox3.Text) >= 40 And Val(TextBox4.Text) >= 40 Then
' TextBox7.Text = "Pass"
'Else
' TextBox7.Text = "Fail"
'End If
'End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim total, per As Double
total = Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text)
TextBox5.Text = total
per = total / 3
TextBox6.Text = per
If Val(TextBox2.Text) >= 40 And Val(TextBox3.Text) >= 40 And Val(TextBox4.Text) >= 40 Then
' If per >= 100 And per <= 70 Then
TextBox7.Text = "Pass"
Else
TextBox7.Text = "Fail"
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
TextBox6.Clear()
TextBox7.Clear()
End Sub
'Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged
' calculate()
' End Sub
'Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
' calculate()
' End Sub
' Private Sub TextBox4_TextChanged(sender As Object, e As EventArgs) Handles TextBox4.TextChanged
' calculate()
'End Sub
End Class