Re: Add Back Space to a constant

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



This is exactly what I am doing.
I need to restrict the user to enter only numeric character into a textbox.

This is the set of keys that the textbox can take:

0123456789+-.E <back space> <Enter>, and <Delete>

possible <Ctrl-C>, <Ctrl-V>, <Ctrl-X>, <Ctrl-Z>, and <ESC>


I want to put all these keys in a constant.



"Rick Rothstein [MVP - Visual Basic]" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx>
wrote in message news:%2335KmOyNGHA.2336@xxxxxxxxxxxxxxxxxxxxxxx
Those constants you specified are normally
meant to be used in KeyUp or KeyDown event procedures when checking
against
the KeyCode argument.


.



Relevant Pages

  • Re: New to .NET
    ... some glorified calculators, and was wondering if someone may be able to ... Datatypes for text in a textbox... ... The textbox control has a Keypress event where you can place code to accept keys or reject keys, like only accept numeric keys and keys like ',' or '.' ... You have the Format command itself or the ToStringto format currency text. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Changing the default language in specific textBox
    ... your own mappings between the keys and the letters displayed by the textbox. ... > hit the 'T' key he will get a T in the textBox and not the parallel letter ... > user hit and then change it to the english parallel in the keyboard, ...
    (microsoft.public.dotnet.languages.csharp)
  • Custom Control, Handled and Shift+Del
    ... TextBox and it has the same problem. ... Creating Custom Controls with the .NET Compact Framework ... The problem is if the Locked property is used all keys are ignored apart ... characters at certain positions are fixed. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Integer value from a text box.
    ... you could hook up to the events on the textbox that monitor ... when keys are pressed, and invalidate them if they don't form a number. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: TextBox align=right?
    ... Custom attributes defined on a WebControl's tag would be outputted as-is if ... they are not recognized to match any typed property. ... //Output the keys ... the properties of the textbox, ...
    (microsoft.public.dotnet.framework.aspnet)