Public Class FormHome Private Sub txtExit_Click(ByVal sender As System.Object, ByVal e As System.

EventArgs) Handles btnExit.Click 'btnExit 'n\buat nutup 1 form doang Me.Close() 'buat nutup satu program 'End End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click 'btnClear txtNama.Text = "1" txtNilai1.Text = "" txtNilai2.Text = "" txtNilai3.Text = "" txtNilaiAkhir.Text = "" txtGrade.Text = "" End Sub Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click 'validai If txtNama.Text = "" Then MessageBox.Show("Isi Nama!") Exit Sub End If If txtNilai1.Text = "" Then MessageBox.Show("Isi Nilai 1!") Exit Sub End If If 0 >= Val(txtNilai1.Text) Or (txtNilai1.Text) >= 100 Then MessageBox.Show("Masukkan nilai yang benar!") Exit Sub End If If txtNilai2.Text = "" Then MessageBox.Show("Isi Nilai 2!") Exit Sub End If If txtNilai3.Text = "" Then MessageBox.Show("Isi Nilai 3!") Exit Sub End If

Dim Dim Dim Dim

Nilai1 as Integer Nilai2 As Integer Nilai3 As Integer NilaiAkhir As Single

round 'buletin adil: math.EventArgs) Handles MyBase.Object.Text = NilaiAkhir Select Case Math. ByVal e As System.TextChanged End Sub End Class .floor Case Case Case Case Case 85 To 100 : Grade = "A" 75 To 84 : Grade = "B" 65 To 74 : Grade = "C" 55 To 64 : Grade = "D" Else Grade = "E" End Select txtGrade.TextChanged End Sub Private Sub txtNilai2_TextChanged(ByVal sender As System.EventArgs) Handles txtNilai1.Text) Nilai3 = Val(txtNilai3.Dim Grade As String Nilai1 = Val(txtNilai1. ByVal e As System.Text) NilaiAkhir = (Nilai1 + Nilai2 + Nilai3) / 3 txtNilaiAkhir.Text) Nilai2 = Val(txtNilai2.Load End Sub Private Sub txtNilai1_TextChanged(ByVal sender As System.Object.EventArgs) Handles txtNilai2.Text = Grade End Sub Private Sub FormHome_Load(ByVal sender As System.Round(NilaiAkhir) 'buletin adil: math. ByVal e As System.Object.ceil 'buletin adil: math.

Sign up to vote on this title
UsefulNot useful