Hi,
I am looking for ways in console to control user input according to the following examples:
a. a form where the user is requested to enter a name and I want the user from entering any numeric and to block the input as soon as a length limit is reached, say for example 20 characters long.
b. same as above but only accepting numbers and 7 digit long (example 999-9999 for a phone number)
c. where the input is automatically covered by an asterix "*" i.e in a login form wrt to the password
d. I have remarked that using the upward/downward direction key in input sometimes function like DOS doskey. Previous inputs are shown. Are there way to disable this ability?
Thank you in advanced.
T. Nicolas MARIE.

1 answers
Here's a program I wrote in response to a similar question on C# Friends which shows how you can control and delimit the input of various types of field (names, integers, decimals, dates, characters and passwords) within a console 'form'.
Rather than use the cursor to move between fields, the program allows the user to enter the whole form and then edit any fields on it before proceeding to the next form or quitting entry.
Although this may not be quite what you want, it should give you a basic framework for building your own console forms and controlling entry:
answered one year ago by:
17279
30
Thank you very much. I believe I will need you help as I will try to implement your program codes into mine. This will greatly help me progressing through learning C# while programming. Thousands of Thanks. Nic.