Kamis, 31 Maret 2011
materi 2
Public Class Form1
Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click
End Sub
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Call bersih()
Call isicombo()
End Sub
Sub bersih()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
ComboBox1.Text = "06 Teknik Informatika"
End Sub
Sub isicombo()
ComboBox1.Items.Add("06 Teknik Informatika")
ComboBox1.Items.Add("07 Sistem Informasi")
ComboBox1.Items.Add("05 Management Informatika")
ComboBox1.Items.Add("67 Komputer Akutansi")
ComboBox1.Items.Add("26 teknik Komputer")
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
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar