Membuat perubahan warna pada button pada saat diklik
design form seperti gambar dibawah ini
Lalu ikuti printa kode dibawah ini
Public Class Form1
Private Sub satu_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles satu.GotFocus
satu.BackColor = Color.White
End Sub
Private Sub satu_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles satu.LostFocus
satu.BackColor = Color.Yellow
End Sub
Private Sub dua_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles dua.GotFocus
dua.BackColor = Color.White
End Sub
Private Sub dua_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles dua.LostFocus
dua.BackColor = Color.Yellow
End Sub
Private Sub tiga_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tiga.GotFocus
tiga.BackColor = Color.White
End Sub
Private Sub tiga_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tiga.LostFocus
tiga.BackColor = Color.Yellow
End Sub
Private Sub empat_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles empat.GotFocus
empat.BackColor = Color.White
End Sub
Private Sub empat_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles empat.LostFocus
empat.BackColor = Color.Yellow
End Sub
End Class
trianiarista.blogspot.com
mesran.net
design form seperti gambar dibawah ini
Public Class Form1
Private Sub satu_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles satu.GotFocus
satu.BackColor = Color.White
End Sub
Private Sub satu_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles satu.LostFocus
satu.BackColor = Color.Yellow
End Sub
Private Sub dua_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles dua.GotFocus
dua.BackColor = Color.White
End Sub
Private Sub dua_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles dua.LostFocus
dua.BackColor = Color.Yellow
End Sub
Private Sub tiga_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tiga.GotFocus
tiga.BackColor = Color.White
End Sub
Private Sub tiga_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tiga.LostFocus
tiga.BackColor = Color.Yellow
End Sub
Private Sub empat_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles empat.GotFocus
empat.BackColor = Color.White
End Sub
Private Sub empat_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles empat.LostFocus
empat.BackColor = Color.Yellow
End Sub
End Class
trianiarista.blogspot.com
mesran.net
0 komentar:
Posting Komentar