Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo
Re: Restrict keys in textbox w/o KeyAscii? (Thursday, December 23, 2004)
 

Found the following interesting discussion in the Newsgroups:

Re: Restrict keys in textbox w/o KeyAscii?
by:hansolo

> Ok folks. Had some code in VB6 that worked fine within a TextBox KeyPress



 Reply:
by:Claes Bergefall

 Can't seem to find the start of this thread?!
Well, ayway

There is nothing wrong with your keyboard
You have your ASCII codes mixed up
n = 110
N = 78
Backspace = 8
/ = 47

ASCII for Del is irrelevant since it doesn't generate a KeyPress event
Never heard of the HELP key. Do you mean F1?
You should support ',' aswell (ASCII 44)

/claes


 Reply:
by:hansolo

 Thanks, you are correct as I am sure you know. I was getting my information
from the Keys Enumeration member help topic in .NET 2003. Evedently a few
things in this table do not match the Ascii codes. Pretty close though.

Thanks for picking up on my error.

Chuck



Posted by Xander Zelders



 
Previous Posts
    - Returning values FROM window form
    - Make multithreading do only X threads at a time.
    - Is it possible to execute an iSeries program from ...
    - Datagrid columns
    - XML?, INI File?, How do I do this?
    - character selection in a string
    - Split function not working.....
    - Multi-Lingual application
    - HasChanges not being updated?
    - VB6 conversion of UDT to structure - ValueType?

Archives
    - 10/03/2004 - 10/10/2004
    - 10/10/2004 - 10/17/2004
    - 10/17/2004 - 10/24/2004
    - 10/24/2004 - 10/31/2004
    - 10/31/2004 - 11/07/2004
    - 11/21/2004 - 11/28/2004
    - 11/28/2004 - 12/05/2004
    - 12/05/2004 - 12/12/2004
    - 12/12/2004 - 12/19/2004
    - 12/19/2004 - 12/26/2004
    - 12/26/2004 - 01/02/2005
    - 01/23/2005 - 01/30/2005
    - 01/01/2006 - 01/08/2006
    - 09/24/2006 - 10/01/2006


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland