|
-
Mar 14th, 2019, 05:06 AM
#1
Thread Starter
Addicted Member
How to disallow non-numeric letters in WinForms TextBox?
I am reworking old VB6 application into VB.NET.
I have a form with 160 TextBox fileds kept inside TextBoxArray component.
MaksedTextBox can be easily set to allow only numeric letters from keyboard, but text box component doesn't have that ability.
I have two solutions, either replace all 160 fields with 160 MaskedTextBox fields or write some script and place it inside the keyup event and remove non-numeric letters.
The TextBoxArray has KeyUp, KeyDown, KeyPress events but I am not sure how to format text to be just numeric in VB.NET or either in VB6 compatibility.
Any ideas how to disable non-numeric letters or either remove those?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|