Haii gan..
Di postingan saya kali ini saya ingin berbagi ilmu mengenai materi Visual Studio. Dengan coding-coding yang mungkin bikin pusing waktu kita membuat aplikasi. Di sini saya ingin berbagi coding button Tambah, button Simpan, button Hapus, button Edit, button Batal dan Button untuk menuju form yang di inginkan.
- Button Login
Me.Hide()
Form2.Show()
ElseIf TextBox1.Text = "" And TextBox2.Text = "" Then
MessageBox.Show("Mohon isi username dan password terlebih dahulu", "PEMBERITAHUAN", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
- Untuk mengubah Character pada textfield agar jadi bulat.
Letakkan cursor pada TextField2 atau TextField untuk input password. Seperti gambar berikut:
Pada properties PasswordChar yang semula kosong, isi dengan (*) . Tandanya pada TextField Password nanti tampilan hurufnya akan di ganti dengan (*)
- Button Tambah / Add
Private Sub Button_Click(sender As Object, e As EventArgs) Handles Button.Click
Me.[nama_tabel]BindingSource.AddNew()
End Sub - Button Simpan / Save
Private Sub Button_Click(sender As Object, e As EventArgs) Handles Button.Click
Me.[nama_tabel]BindingNavigatorSaveItem.PerformClick()
End Sub - Button Hapus / Delete
Private Sub Button_Click(sender As Object, e As EventArgs) Handles Button.Click
Me.[nama_tabel]BindingSource.RemoveCurrent()
End Sub - Button Batal / Cancel
TextField1.Text = ""
TextField2.Text = ""
TextField3.Text = ""
TextField4.Text = "" - Button Edit
Private Sub Button_Click(sender As Object, e As EventArgs) Handles Button.Click
Me.[nama_tabel]BindingSource.EndEdit()
End Sub - Button Form yang diinginkan
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.Hide()
Form3.Show()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Me.Hide()
Form4.Show()
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Me.Hide()
Form5.Show()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Me.Hide()
Form6.Show()
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Me.Hide()
Form7.Show()
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
Me.Hide()
Form8.Show()
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Me.Hide()
Form8.Show()
End Sub
- Button Keluar
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
End
End Sub
Sekian dulu postingan saya..Tunggu postingan saya selanjutnya
Semoga bermanfaat :-)
Posting Komentar