1. Design Akademik Mahasiswa
2. Sintaknya
Public class form1
Dim isiText(4) As String
Dim milis As ListViewItem
Private sub form1....
Call Bersih ( )
Call isi Combo ( )
Call Tampilan ( )
End Sub
Private sub Form1...
End sub
Sub Bersih ( )
TextBox1.Text = “ “
TextBox2.Text = “ “
TextBox3.Text = “ “
ComboBox1.Text = “ 06 Teknik Informatika “
End sub
Sub isi Combo ( )
ComboBox1.Items.Add (“06 Teknik Informatika”)
ComboBox1.Items.Add (“07 Sistem Informatika”)
ComboBox1.Items.Add (“67 Komputer Akuntansi”)
ComboBox1.Items.Add (“05 Teknik Komputer”)
ComboBox1.Items.Add (“26 Managemen Informatika”)
End sub
Private sub Buton1_click....
If Button1.Text = “Tambah” then
Button1.Text = “Simpan”
Button2.Enabled = False
Button3.Enabled = False
Button4.Text = “Batal”
TextBox1.Focus ( )
Else
Isi Text(0) =trim (TextBox1.Text)
Isi Text(1)=trim (TextBox2.Text)
Isi Text(2)=trim (TextBox3.Text)
Isi Text(3)=Microsoft.Visual Basic.Left(trim (ComboBox1.Text),2)
Milis = New ListView Item (isiText)
ListView1.Items .Add (Milis)
Call Bersih( )
TextBox1. Focus( )
End If
End sub
Private sub Botton4_click
If Button4.Text = “Keluar” Then
Me. Close( )
Else
Call Bersih ( )
Call Normal ( )
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 Button2_click
If Button2.Text = “Ubah” Then
Button2.Text = “Simpan”
Button3.Enabled = False
Button1.Enabled = False
Button4.Text = “Batal”
TextBox1. Focus( )
Else
End If
End sub
Private sub Button3_click
If Button3.Text = “Hapus” Then
Button3.Text = “ok”
Button1.Enabled = False
Button2.Enabled = False
Button4.Text = “Batal”
End If
End sub
Sub Tampilan ( )
ListView1.View = View.Details
ListView1.Columns.Add(“NPM”,100,Horizontal Alignment.Center)
ListView1.Columns.Add(“Nama”,100,Horizontal Alignment.Left)
ListView1.Columns.Add(“Alamat”,100,Horizontal Alignment.Left)
ListView1.Columns.Add(“Jurusan”,200,Horizontal Alignment.Left)
End sub
Private sub ListView1_Item Selection Changed
TextBox1.Text =e.Item.Text
End sub
Private sub ListView1_Selected Index Change
End sub
Private sub TextBox1_KeyPress
TextBox1.Focus( )
End sub
Private sub TextBox2_Text Changed
End sub
End class
3. Di RUNNING Programnya