links

zumrotulaqobahhsb.blogspot.com. Diberdayakan oleh Blogger.

Senin, 24 Juni 2013

TUGAS Q



Public Class Form1

    Private Sub CaesarChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CaesarChiperToolStripMenuItem.Click
        Form3.MdiParent = Me
        Form3.Show()
    End Sub

    Private Sub VigenereToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VigenereToolStripMenuItem.Click
        Form2.MdiParent = Me
        Form2.Show()
    End Sub

    Private Sub GransfeldChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GransfeldChiperToolStripMenuItem.Click
        Form4.MdiParent = Me
        Form4.Show()
    End Sub

    Private Sub VernamChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VernamChiperToolStripMenuItem.Click
        Form5.MdiParent = Me
        Form5.Show()
    End Sub

    Private Sub DesChiperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DesChiperToolStripMenuItem.Click
        Form6.MdiParent = Me
        Form6.Show()
    End Sub

    Private Sub RC4ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RC4ToolStripMenuItem.Click
        Form7.MdiParent = Me
        Form7.Show()
    End Sub

    Private Sub KeluarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KeluarToolStripMenuItem.Click
        End
    End Sub
End Class

CAESAR CHIPER

Public Class Form3

    Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        plain.Text = ""
        chiper.Text = ""
    End Sub

    Private Sub enkript_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles enkript.Click
        Dim jumlah As Double = Len(plain.Text)
        Dim x As String
        Dim xkalimat As String = ""
        Dim i As Double
        Dim bil As Integer
        For i = 1 To jumlah
            x = Mid(plain.Text, i, 1)
            bil = Asc(x) + 3
            x = Chr(bil)
            xkalimat = xkalimat + x
        Next i
        chiper.Text = xkalimat
    End Sub

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

Minggu, 02 Juni 2013

HASIL PROGRAM SOAL NO 1.

HASIL PROGRAM SOAL NO 1.
LISTING PROGRAMNYA....:
Public Class Form2
    Sub buattabel()
        LV.Columns.Add("pembelian", 80, HorizontalAlignment.Center)
        LV.Columns.Add("kode barang", 80, HorizontalAlignment.Left)
        LV.Columns.Add("nama barang", 120, HorizontalAlignment.Left)
        LV.Columns.Add("merk", 80, HorizontalAlignment.Left)
        LV.Columns.Add("harga", 80, HorizontalAlignment.Left)
        LV.Columns.Add("jmlh beli", 80, HorizontalAlignment.Left)
        LV.Columns.Add("ttl harga", 80, HorizontalAlignment.Left)
        LV.View = View.Details
        LV.GridLines = True
        LV.FullRowSelect = True
    End Sub
    Sub isitable()
        Dim lst As New ListViewItem
        lst.Text = pembelian.Text
        lst.SubItems.Add(kd_brg.Text)
        lst.SubItems.Add(nm_brg.Text)
        lst.SubItems.Add(merk.Text)
        lst.SubItems.Add(harga.Text)
        lst.SubItems.Add(jlh_beli.Text)
        lst.SubItems.Add(ttl_harga.Text)
        LV.Items.Add(lst)
    End Sub

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        kd_brg.Items.Add("TS001")
        kd_brg.Items.Add("TS002")
        kd_brg.Items.Add("VG001")
        kd_brg.Items.Add("VG002")
        buattabel()
    End Sub

    Private Sub kd_brg_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kd_brg.SelectedIndexChanged
        Dim X As String
        X = Microsoft.VisualBasic.Left(kd_brg.Text, 2)
        Select Case X
            Case "TS" : merk.Text = "TOSIBA"
            Case "VG" : merk.Text = "V-GEN"
        End Select

        X = Microsoft.VisualBasic.Right(kd_brg.Text, 5)
        Select Case X
            Case "TS001" : nm_brg.Text = "FLASDISK 4 GB" : harga.Text = "1050000"
            Case "TS002" : nm_brg.Text = "FLASDISK 2 GB" : harga.Text = "75000"
            Case "VG001" : nm_brg.Text = "FLASDISK 4 GB" : harga.Text = "90000"
            Case "VG002" : nm_brg.Text = "FLASDISK 2 GB" : harga.Text = "60000"
        End Select
    End Sub
    Private Sub simpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan.Click
        ttl_harga.Text = harga.Text * jlh_beli.Text
        isitable()
        pembelian.Text = ""
        kd_brg.Text = ""
        nm_brg.Text = ""
        merk.Text = ""
        harga.Text = ""
        jlh_beli.Text = ""
        ttl_harga.Text = ""
    End Sub

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

    Private Sub hps_data_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hps_data.Click
        LV.Items.Clear()
    End Sub

    Private Sub hps_dipilih_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hps_dipilih.Click
        LV.Items.Remove(LV.SelectedItems(0))
    End Sub
End Class

Sabtu, 25 Mei 2013

PROGRAM PENYAJIAN GAJI MENGGUNAKAN LISTVIEW....

Public Class Form1

    Sub BUATTABLE()
        LV.Columns.Add("NIK", 80, HorizontalAlignment.Center)
        LV.Columns.Add("NAMA", 100, HorizontalAlignment.Left)
        LV.Columns.Add("JABATAN", 60, HorizontalAlignment.Left)
        LV.Columns.Add("GAJI", 60, HorizontalAlignment.Left)
        LV.Columns.Add("STATUS", 60, HorizontalAlignment.Left)
        LV.Columns.Add("TJN KELUARGA", 60, HorizontalAlignment.Left)
        LV.Columns.Add("PAJAK", 60, HorizontalAlignment.Left)
        LV.Columns.Add("TOTAL GAJI", 80, HorizontalAlignment.Left)
        LV.View = View.Details
        LV.GridLines = True
        LV.FullRowSelect = True
    End Sub
    Sub ISITABLE()
        Dim LST As New ListViewItem
        LST.Text = NIK.Text
        LST.SubItems.Add(NAMA.Text)
        LST.SubItems.Add(JABATAN.Text)
        LST.SubItems.Add(GAJI.Text)
        LST.SubItems.Add(STATUS.Text)
        LST.SubItems.Add(TUNJ.Text)
        LST.SubItems.Add(PAJAK.Text)
        LST.SubItems.Add(TTL_GAJI.Text)
        LV.Items.Add(LST)
    End Sub


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        NIK.Items.Add("001")
        NIK.Items.Add("002")
        NIK.Items.Add("003")
        JABATAN.Items.Add("MANDOR")
        JABATAN.Items.Add("KEPALA BAGIAN")
        JABATAN.Items.Add("STAF")
        STATUS.Items.Add("MENIKAH")
        STATUS.Items.Add("LAJANG")
        BUATTABLE()
    End Sub

    Private Sub JABATAN_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JABATAN.SelectedIndexChanged
        Select Case JABATAN.Text
            Case "MANDOR" : GAJI.Text = 1750000
            Case "KEPALA BAGIAN" : GAJI.Text = 2500000
            Case "STAF" : GAJI.Text = 1250000
        End Select
        PAJAK.Text = 0.15 * GAJI.Text
    End Sub

    Private Sub NIK_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NIK.SelectedIndexChanged
        Select Case NIK.Text
            Case "001" : NAMA.Text = "HASIBUAN"
            Case "002" : NAMA.Text = "NASUTION"
            Case "003" : NAMA.Text = "LUBIS"
        End Select
    End Sub

    Private Sub STATUS_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles STATUS.SelectedIndexChanged
        Select Case STATUS.Text
            Case "MENIKAH" : TUNJ.Text = 0.15 * GAJI.Text
            Case "LAJANG" : TUNJ.Text = 0
        End Select
    End Sub

    Private Sub BTNPROSES_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNPROSES.Click
        TTL_GAJI.Text = Val(GAJI.Text) + Val(TUNJ.Text) - Val(PAJAK.Text)
        ISITABLE()
        NIK.Text = ""
        NAMA.Text = ""
        JABATAN.Text = ""
        GAJI.Text = ""
        STATUS.Text = ""
        TUNJ.Text = ""
        PAJAK.Text = ""
        TTL_GAJI.Text = ""
    End Sub

    Private Sub BTNKELUAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNKELUAR.Click
        Close()
    End Sub
End Class
 *HASILNYA PROGRAMNYA..