Joni Suprihanto

Lihat Info di bawah ini

Kamis, 21 April 2011

Public Class Form1
    Private Sub Form1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
        Call bersih()
        Call Isi_combo()
    End Sub
    Sub bersih()
        TextBox1.Text = " "
        TextBox2.Text = " "
        TextBox3.Text = " "
        TextBox4.Text = " "
        ComboBox1.Text = "06 Teknik Informatika"
    End Sub
    Sub Isi_combo()
        ComboBox1.Items.Add("06 Teknik Informatika")
        ComboBox1.Items.Add("07 Sistem Informasi")
        ComboBox1.Items.Add("05 Manajement Informatika")
        ComboBox1.Items.Add("67 Teknik Komputer")
        ComboBox1.Items.Add("26 Komputer Akuntansi")
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        If Button4.Text = "keluar" Then
            Me.Close()
        Else
            Call normal()
            Call bersih()
        End If
    End Sub
    Sub normal()
        Button1.Text = "Tambah"
        Button1.Enabled = True
        Button2.Text = "Ubah"
        Button2.Enabled = True
        Button3.Text = "Hapus"
        Button3.Enabled = True
        Button4.Text = "Keluar"
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Button1.Text = "Tambah" Then
            Button1.Text = "Simpan"
            Button2.Enabled = False
            Button3.Enabled = False
            Button4.Text = "Batal"
            TextBox1.Focus()
        Else

        End If

    End Sub
End Class

Tidak ada komentar:

Posting Komentar