Vb.Net tools Focus Color | Techbymati



    Vb.Net tools Focus Color ( Textbox,Combobox and others)

    Private Sub focus_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_partyname.Enter, _

            cb_partydist.Enter, _

            cb_partycity.Enter, _

            txt_partyadd.Enter, _

            txt_partyphone.Enter, _

            txt_partypin.Enter, _

            txt_partygstno.Enter, _

            txt_partypan.Enter


            ' Dim tb As TextBox = sender

            ' Dim cb As ComboBox = sender

            ' tb.BackColor = Color.LightPink

            ' cb.BackColor = Color.LightPink

            DirectCast(sender, Control).BackColor = Color.LightPink

        End Sub

        Private Sub focus_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_partyname.Leave, _

            cb_partydist.Leave, _

            cb_partycity.Leave, _

            txt_partyadd.Leave, _

            txt_partyphone.Leave, _

            txt_partypin.Leave, _

            txt_partygstno.Leave, _

            txt_partypan.Leave

            ' Dim tb As TextBox = sender

            ';tb.BackColor = Color.White

            DirectCast(sender, Control).BackColor = Color.White

        End Sub

     

    Matibar

    Blogger

    Thank You

    Previous Post Next Post

    Contact Form