YUDI IRAWAN YUDI IRAWAN YUDI IRAWAN SHARING: PENGGUNAAN FUNGSI STRING >

Selasa, 08 November 2011

PENGGUNAAN FUNGSI STRING

1.DESIG FORM














2.HASIL PROGRAM UNTUK CBOTAHUN















3.HASIL PROGRAM UNTUK CBOJURUSAN















4.HASIL PROGRAM UNTUK CBONO















5.HASIL PROGRAM UNTUK CBONPM















6.HASIL KESELURUHAN PROGRAM

7.LISTING PROGRAM
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim t, s As Integer
        Dim j As String
        Dim k As String

        t = 2005
        Do While t <= 2011
            CBOtahun.Items.Add(t)
            t = t + 1
        Loop

        CBOJURUSAN.Items.Add("S1")
        CBOJURUSAN.Items.Add("D3")

        s = 100
        Do While s <= 250
            CBONO.Items.Add(s)
            s = s + 1
        Loop

    End Sub

    Private Sub no_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CBONO.SelectedIndexChanged
        Dim a, b As String
        If CBOJURUSAN.Text = "S1" Then
            b = "11"
        Else
            b = "02"
        End If

        a = Microsoft.VisualBasic.Right(CBOtahun.Text, 2)
        CBONPM.Text = (a & b & CBONO.Text)
    End Sub

    Private Sub jurusan_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CBOJURUSAN.SelectedIndexChanged
        Dim a, b As String
        Dim c As Integer

        If CBOJURUSAN.Text = "S1" Then
            a = "11"
        Else
            a = "02"
        End If
        b = Microsoft.VisualBasic.Right(CBOtahun.Text, 2)
        c = 100
        Do While c <= 250
            CBONO.Items.Add(c)
            CBONPM.Items.Add(b & a & c)
            c = c + 1
        Loop
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CMDHAPUS.Click
        CBOtahun.Text = ""
        CBOJURUSAN.Text = ""
        CBONO.Text = ""
        CBONPM.Text = ""
    End Sub

    Private Sub CMDKELUAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CMDKELUAR.Click
        Close()
    End Sub
End Class


Tidak ada komentar:

Posting Komentar