Fungsi String VB.NET


FUNGSI STRING MENGHITUNG NILAI




Public Class penggunaan_fungsi_string_nilai

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
        End
    End Sub

    Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click

        If nilai.Text >= 80 Then
            huruf.Text = "A"
        ElseIf nilai.Text >= 70 Then
            huruf.Text = "B"
        ElseIf nilai.Text >= 60 Then
            huruf.Text = "C"
        ElseIf nilai.Text >= 50 Then
            huruf.Text = "D"
        Else
            huruf.Text = "E"
        End If

    End Sub

    Private Sub nilai_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles nilai.KeyPress
        If e.KeyChar = Chr(13) Then
            Call btnproses_Click(sender, e)
        End If
    End Sub

    Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
        npm.Text = ""
        nama.Text = ""
        matakuliah.Text = ""
        nilai.Text = ""
        huruf.Text = ""
        npm.Focus()
    End Sub

    Private Sub penggunaan_fungsi_string_nilai_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        npm.Focus()
    End Sub
End Class
Fungsi String VB.NET Fungsi String VB.NET Reviewed by Pak Gulo on November 30, 2015 Rating: 5

2 komentar:

Diberdayakan oleh Blogger.