Minggu, 07 Desember 2014

yuk belajar pemograman visual basik









Public Class Form1

    Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label5.Click

    End Sub

    Private Sub Label8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        For i = 100 To 1 Step -5
            nmid.Items.Add(i)
            nsemester.Items.Add(i)
        Next i
        npm.Items.Add("13110614")
        npm.Items.Add("13110715")
        npm.Items.Add("13110816")
        npm.Items.Add("13110917")
        npm.Items.Add("13111018")
        mkuliah.Items.Add("Algoritma")
        mkuliah.Items.Add("Sistem Informasi")
        mkuliah.Items.Add("Data base")
        mkuliah.Items.Add("Komunikasi Data")
        mkuliah.Items.Add("Struktur komputer")

    End Sub

    Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click
        nakhir.Text = 0.4 * nmid.Text + 0.6 * nsemester.Text
        If nakhir.Text >= 80 Then
            nhuruf.Text = "A"
            ket.Text = "lulus"
        ElseIf nakhir.Text >= 70 Then
            nhuruf.Text = "B"
            ket.Text = "lulus"
        ElseIf nakhir.Text >= 60 Then
            nhuruf.Text = "C"
            ket.Text = "tidak lulus"
        ElseIf nakhir.Text >= 50 Then
            nhuruf.Text = "D"
            ket.Text = "tidak lulus"
        ElseIf nakhir.Text <= 40 Then
            nhuruf.Text = "E"
            ket.Text = "tidak lulus"


        End If
    End Sub

    Private Sub npm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles npm.SelectedIndexChanged
        If npm.Text = ("13110614") Then
            nama.Text = "Christop"
        ElseIf npm.Text = ("13110715") Then
            nama.Text = "Willman"
        ElseIf npm.Text = ("13110816") Then
            nama.Text = "Shadow"
        ElseIf npm.Text = ("13110917") Then
            nama.Text = "Jaya"
        ElseIf npm.Text = ("13111018") Then
            nama.Text = "Jhon"

        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 = " "
        mkuliah.Text = " "
        nmid.Text = " "
        nsemester.Text = " "
        nakhir.Text = " "
        nhuruf.Text = " "
    End Sub

    Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keluar.Click
        Me.Close()

    End Sub

    Private Sub nmid_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nmid.SelectedIndexChanged

    End Sub
End Class


NAMA ; IMAM WAHYUDI HANDOKO 
NPM ; 13110678