maskedTextBox works for hexadecimal input

csharp Taiwan
  • 13 years ago

    Dear All,

    Can we filter out the input char other than hexadecimal digits (0-9,A-F) by just setting the Mask string?  If it's possible, please tell me how to do it.  Many thanks in advance.

    Cy

  • 13 years ago
    Can we filter out the input char other than hexadecimal digits (0-9,A-F) by just setting the Mask string?

    No.

    You would either need to subclass the text box, or look at an alternative.  Perhaps you can separate the input.  Have a masked input for the part that needs it, and a regular text box for the Hex part.  Otherwise you could end up with quite a confusing interface.





  • 13 years ago

    You could use regular expressions for the textbox.

    http://www.perlmonks.org/?node_id=629558

     

     

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila” - Mitch Ratcliffe