Home » » Membuat perubahan warna pada button pada saat diklik

Membuat perubahan warna pada button pada saat diklik

                                 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

Written by : Your Name - Describe about you

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam id libero non erat fermentum varius eget at elit. Suspendisse vel mattis diam. Ut sed dui in lectus hendrerit interdum nec ac neque. Praesent a metus eget augue lacinia accumsan ullamcorper sit amet tellus.

Join Me On: Facebook | Twitter | Google Plus :: Thank you for visiting ! ::

0 komentar:

Posting Komentar