|
-
Sep 12th, 2000, 07:04 AM
#1
Thread Starter
Hyperactive Member
This stops me from typing text, but how would i be able to write text and stop numbers?
If KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
Beep
End If
-RaY
VB .Net 2010 (Ultimate)
-
Sep 12th, 2000, 07:11 AM
#2
Since your using VB3 you don't have the constants but this code works.
Code:
If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then
KeyAscii = 0
End If
-
Sep 12th, 2000, 07:12 AM
#3
Member
IsNumeric
maybe you can use the isnumeric-function...
Check your msdn help about this !
ex.
---------------------------------------
If IsNumeric(text1.text) True Then
'It's numeric !
Else
' It's Not !
End If
---------------------------------------
-
Sep 12th, 2000, 07:15 AM
#4
Re: IsNumeric
Originally posted by Red Thread
maybe you can use the isnumeric-function...
IsNumeric didn't exist in VB3
-
Sep 12th, 2000, 07:16 AM
#5
Member
Oeps...
Oeppssss
Don't know if VB3 has this function...
I'll doubt it
-
Sep 12th, 2000, 07:34 AM
#6
transcendental analytic
Isnumeric allows some special characters -+ and DE, so i suggest you compare with like operator:
Code:
If not (text1 like "*#*") then 'contains numbers
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Sep 12th, 2000, 07:39 AM
#7
Thread Starter
Hyperactive Member
Thanks guys
Thanks got it to work, and kedman thanks for that post that was my next question!
-RaY
VB .Net 2010 (Ultimate)
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
|