Beljar Bahasa Pemograman

Friday, 8 November 20130 comments



haii teman -teman aq setanah air :D
neh aq baru posting bahasa pemograman neh mungkin ntie bisa di baca atau di ikuti yah...


1.Buat design seperti gambar d bawah ini
 gambar ini terdiri dari 15 label, 6 combobox, 9 text boox dan 3 button


 jadi kalau udah selesai di double klik combobox Npm ikuti langkah langkahnya yah jngan sampek salah nanti yah...



Public Class Form1

    Private Sub Npm_SelecteedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Npm.SelectedIndexChanged
        Select Case Npm.Text
            Case "11120544"
                Nama.Text = "Ahmad Hafizi"
            Case "16120545"
                Nama.Text = "Edwin Raymon Damanik"
            Case "10120546"
                Nama.Text = "Parningotan Rambe"
            Case Else
                Nama.Text = "_"
        End Select
        Dim i As String
        i = Microsoft.VisualBasic.Left(Npm.Text, 2)
        If i = "11" Then
            Jurusan.Text = "Sistem Informasi"
            Jenjang.Text = "SI"
        ElseIf i = "16" Then
            Jurusan.Text = "Teknik Informatika"
            Jenjang.Text = "D3"
        ElseIf i = "10" Then
            Jurusan.Text = "Komputer Akuntansi"
            Jenjang.Text = "D1"
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Npm.Items.Add("11120544")
        Npm.Items.Add("16120545")
        Npm.Items.Add("10120546")

        KoDo.Items.Add("11122")
        KoDo.Items.Add("11123")
        KoDo.Items.Add("11124")

        Dim i As Integer
        For i = 40 To 100
            NiKe.Items.Add(i)
            NUas.Items.Add(i)
            NT.Items.Add(i)
            NUts.Items.Add(i)
        Next i
    End Sub

    Private Sub KoDo_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KoDo.SelectedIndexChanged
        Select Case KoDo.Text
            Case ("11122")
                NaDo.Text = ("Mesran,SKom")
            Case ("11123")
                NaDo.Text = ("Sinar Sinurat")
            Case ("11124")
                NaDo.Text = ("Kristian Siregar")
            Case Else
                Nama.Text = "_"
        End Select
        Dim i As String
        i = Microsoft.VisualBasic.Right(KoDo.Text, 3)
        If i = "122" Then
            KoMa.Text = "001"
            Matakuliah.Text = "Pemograman"
        ElseIf i = "123" Then
            KoMa.Text = "002"
            Matakuliah.Text = "stuktur data"
        ElseIf i = "123" Then
            KoMa.Text = "003"
            Matakuliah.Text = "HTML"

        End If
    End Sub

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

    End Sub

    Private Sub Btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnhapus.Click
        Npm.Text = ""
        Nama.Text = ""
        Jenjang.Text = ""
        Jurusan.Text = ""
        KoDo.Text = ""
        NaDo.Text = ""
        KoMa.Text = ""
        Matakuliah.Text = ""
        NiKe.Text = ""
        NT.Text = ""
        NUas.Text = ""
        NUts.Text = ""
        Ket.Text = ""
        NH.Text = ""
        NA.Text = ""
    End Sub

    Private Sub Btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnproses.Click
        NA.Text = 0.01 * NiKe.Text + 0.15 * NT.Text + 0.3 * NUts.Text + 0.45 * NUas.Text

        If NA.Text =< 50 Then
            Ket.Text = "GagaL"
            NH.Text = "E"
        ElseIf NA.Text =< 60 Then
            Ket.Text = "Gagal"
            NH.Text = "D"
        ElseIf NA.Text =< 70 Then
            Ket.Text = "Lulus"
            NH.Text = "B"
        ElseIf NA.Text >= 70 Then
            Ket.Text = "Lulus"
            NH.Text = "B+"
        ElseIf NA.Text >= 80 Then
            Ket.Text = "Lulus"
            NH.Text = "A"
        End If
    End Sub
End Class

kalau udah selesai akan tampil form seperti gambar d bawah ini:







mudah2an berguna tuk temen yah yang ge mau belajar bahasa pemograman....
:P :)



Share this article :

Post a Comment

 
Support : Hafiz_Blogger | haffiz Template | Mas Hafiz
Copyright © 2011. AhmaD_Haffiz - All Rights Reserved
Template Created by Creating hafiz_website Published by Mas Hafiz
Proudly powered by Blogger