Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
textbox in VB.net
Name: connie_triz1 Date: September 12, 2008 at 08:37:16 Pacific OS: xp CPU/Ram: 128 Product: ibm
Comment:
Hi everyone need help! i'm using vb.net and i would like to know the right codes for textbox that only accepts 16 numeric characters. thanks in advance
Name: Razor2.3 Date: September 12, 2008 at 16:18:09 Pacific
Reply:
Meh, why not? Not like I ain't got nothin' better to do.
Step 1: Make a TextBox called, say, txtBx.
Step 2: Set txtBx's MaxLength to 16.
Step 3: Add this Sub:
Private Sub txtBx_KeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs) _ Handles txtBx.KeyPress Const Back As Char = ChrW(Keys.Back) : Const Del As Char = ChrW(Keys.Delete) e.Handled = ((e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso _ (e.KeyChar <> Back AndAlso e.KeyChar <> Del)) End Sub
0
Response Number 2
Name: connie_triz1 Date: September 13, 2008 at 03:09:57 Pacific
Reply:
Hi Razor2.3 !
thanks so much for help...it solved my problem. :-) thank you thank you!
Summary: Hi friends I have a lot of textBoxes on a form in VB.NET . I have a button of Clear which will empty the text boxes existing on the form. My coding is(which is not proper working) Dim ctl As Control ...
Summary: Does anybody know the coding how to disable the close (x) button in VB.NET? The (x) button is shown in the form but just do nothing at runtime. So, the user must click the Cancel button that I created...
Summary: does anyone know how to clear a textbox in asp.net using visualstudio 2002 version in C#. I have used the visual studio version 2003 and in the help files there is a method. But it does not run in the...