Coding nya :
Public Class Frlatihan1
Private Sub Form1_Load(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load
'---mengisi properti objek Form
Me.Text = "Latihan Pertama Menampilkan Nilai Object"
'---Mengisi objek label
Me.lblNim.Text = "No.Induk Mahasiswa"
Me.lblNama.Text = "Nama Lengkap"
Me.lblKelamin.Text = "Jenis Kelamin"
Me.lblAlamat.Text = "Alamat lengkap"
Me.lblKota.Text = "Asal Kota"
'---mengisis objek Button
Me.btList.Text = "&List"
Me.btClear.Text = "&Clear"
Me.btExit.Text = "&Exit"
End Sub
Private Sub btList_Click(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles btList.Click
Me.txtNim.Text = "2007-001"
Me.txtNama.Text = "Zen Munawar ST"
Me.txtKelamin.Text = "Pria"
Me.txtAlamat.Text = "Jl. Gatsu No 123, Binong Jati"
Me.txtKota.Text = "Bandung"
End Sub
Private Sub btClear_Click(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles btClear.Click
Me.txtNim.Clear()
Me.txtNama.Clear()
Me.txtKelamin.Clear()
Me.txtAlamat.Clear()
Me.txtKota.Clear()
Me.txtNim.Focus()
End Sub
Private Sub btExit_Click(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles btExit.Click
Me.Close()
End Sub
0 comments:
Post a Comment