quarta-feira, 31 de agosto de 2011

on


Public Class Form1

    Private Sub txtTexto_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtTexto.KeyPress
        If Len(txtTexto.Text) = 2 Or Len(txtTexto.Text) = 5 Then
            txtTexto.Text = txtTexto.Text & "/"
            txtTexto.SelectionStart = Len(txtTexto.Text) + 1           
        End If
    End Sub

    Private Sub txtTexto2_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtTexto2.KeyPress
        If Len(txtTexto2.Text) = 2 Then
            txtTexto2.Text = txtTexto2.Text & ":"
            txtTexto2.SelectionStart = Len(txtTexto2.Text) + 1
        End If
    End Sub

End Class

Espero ter ajudado e att.

0 comentários:

Postar um comentário

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.