Is it possible when a user enters info into a field you can add a specific character at specific intervals automatically. I'd like to setup a field to enter in dashes "-" at specific entry points but without using a specified "format" or "input mask".
Here's an example.
The user types in 3344443
The code will place a dash whenever a certain length has been reached. When the field reaches 2 characters a dash will be entered automatically, when it reaches a length of 7 another dash will enter automatically, and so on.
You should use the len of textbox.Text property
Hm... can you just add the "-" (I think the cursor will go back to the first char again..., but I don't know... haven't try it ) Instead, you can use SendKeys.
The len function was only mentioned to determine position for the logic of the user-defined mask. How you append the masking characters is left up to the programmer - however, be aware that sendkeys is buggy.