binary value in a textbox
hexadecimal value in a textbox
octal value in a textbox
decimal value in a textbox
it would display invalid input if none of those exist:confused:
Printable View
binary value in a textbox
hexadecimal value in a textbox
octal value in a textbox
decimal value in a textbox
it would display invalid input if none of those exist:confused:
Check out the following functions:
Hex
Oct
Rather than checking specific types, wouldn't it be easier to simply ensure the textbox would not accept alpha characters?
Ohhhhh.. sorry!!
I thought I was in the VB.NET forum. :(
Opting out alpha characters would be wrong.Quote:
Originally Posted by Hack
e.g.
B1C24 is a valid Hexadecimal value, but contains alpha characters.
A better method is to create a function. In the function try to convert the value. If you get an error, that means it can not be converted, so return false. Otherwise return true.
Pradeep :)