Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Key block for textbox


Message #1 by Ramesh Sridharan <mr_sriramesh@y...> on Mon, 13 Jan 2003 08:23:20 -0800 (PST)
What we endup doing is to write a lot of validation methods (for
decimal, negative decimal, floating, negative floating, literal etc)
and put them in a bas module, so we do not have duplicate code,
and we call those method in the keypress event (as a plus, you
can also do a range validation...)
The code is similar to the one already suggested in this thread,
plus dealing with cut and paste. That is, allowing to press Ctrl+C
and Ctrl+V and check the text after a paste.

Marco

> Hi,

  How can i stop user entering some keys, like
allowing numeric-only characters for some field?

  I tracked it with isnumeric function in change
event, but it allows user to enter the character "e"
and "d" in the middle of the number. You know what i
mean...


  Return to Index