text mask don't accept Character "A"

alsh3lan

New member
Joined
Jul 29, 2009
Messages
2
Programming Experience
Beginner
i try to mask my text but it does't work

the code

MaskedTextBox8.Mask = "A00-000"

but when i run the program the mask displayed like that "___-___"

when i change Character "A" with "B" it's work fine "B__-___"

any one can help me
 
For the mask to force the first char to be an "A" you need to tell the mask that it's a literal "A" and not the Alphanumeric, optional.

So the mask should be "\A00-000" instead of "A00-000". Here's a list of the mask codes you can use: MaskedTextBox.Mask Property (System.Windows.Forms)
 
Back
Top