Selasa, 23 Oktober 2012

form string

Add caption

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        NPM.Items.Add("1011664")
        NPM.Items.Add("1102103")
        NPM.Items.Add("1213104")
    End Sub

    Private Sub NPM_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NPM.SelectedIndexChanged
        Dim x As String
        x = Microsoft.VisualBasic.Mid(NPM.Text, 3, 2)
        Select Case x
            Case "11"
                Prodi.Text = "TEKNIK INFORMATIKA"
                Jenjang.Text = "S1"
                Nama.Text = "Ilham muddin"
            Case "02"
                Prodi.Text = "MANAJEMEN INFORMATIKA"
                Jenjang.Text = "D3"
                Nama.Text = "Anjani"
            Case "13"
                Prodi.Text = "Sistem Informasi"
                Jenjang.Text = "S1"
                Nama.Text = "Asa Aro"
        End Select
        Nodaftar.Text = Microsoft.VisualBasic.Right(NPM.Text, 3)
        Tahun.Text = "20" & Microsoft.VisualBasic.Left(NPM.Text, 2)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim i As String
        Huruf.Items.Clear()
        For a = 1 To Len(TextBox1.Text)
            i = Microsoft.VisualBasic.Mid(TextBox1.Text, a, 1)
            i = i & "=" & Asc(i)
            Huruf.Items.Add(i)
        Next a
    End Sub
End Class

Tidak ada komentar:

Posting Komentar