segunda-feira, 15 de agosto de 2011

on
Código a baixo faz com que um TextBox só aceite números.

Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress

If Not (Char.IsDigit(e.KeyChar) OrElseChar.IsControl(e.KeyChar)) Then
e.Handled =
True
End If
End
Sub

Espero que gostem e at+!

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.