473,322 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

MaskedTextBox input mask for 1-AA000

Hi,

I'm trying to define a mask for a MaskedTextBox and can't get it right. For
5 numbers, '00000' seems to be a valid mask and behaves correctly, but I
know need a control that will take a format like this: '0-AA000'
Where 0 can be anything from 0-9 and A can be any letter.

I tried '#-??###' but this mask doesn't work as the control states that it's
mask is completed after the first number is entered.

I checked MSDN but the documentation is VERy light and all the samples I've
found or only numbers.

Am I trying to make this control do something it wasn't intended for?

Thanks for reading,
Steve
Aug 14 '06 #1
2 5680
sklett wrote:
Hi,

I'm trying to define a mask for a MaskedTextBox and can't get it right. For
5 numbers, '00000' seems to be a valid mask and behaves correctly, but I
know need a control that will take a format like this: '0-AA000'
Where 0 can be anything from 0-9 and A can be any letter.

I tried '#-??###' but this mask doesn't work as the control states that it's
mask is completed after the first number is entered.

I checked MSDN but the documentation is VERy light and all the samples I've
found or only numbers.

Am I trying to make this control do something it wasn't intended for?

Thanks for reading,
Steve

Try 0-??000 as # is an optional number and 0 is a required number.
Also presuming that ? is the character for A-Z.
JB
Aug 15 '06 #2

"John B" <jb******@yahoo.comwrote in message
news:44**********@news.iprimus.com.au...
sklett wrote:
>Hi,

I'm trying to define a mask for a MaskedTextBox and can't get it right.
For 5 numbers, '00000' seems to be a valid mask and behaves correctly,
but I know need a control that will take a format like this: '0-AA000'
Where 0 can be anything from 0-9 and A can be any letter.

I tried '#-??###' but this mask doesn't work as the control states that
it's mask is completed after the first number is entered.

I checked MSDN but the documentation is VERy light and all the samples
I've found or only numbers.

Am I trying to make this control do something it wasn't intended for?

Thanks for reading,
Steve
Try 0-??000 as # is an optional number and 0 is a required number.
Also presuming that ? is the character for A-Z.
JB
That did it, thanks for the help.
Have a good one,
Steve
Aug 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris | last post by:
Hi, Has anybody found any info on what characters signify what in the the .net 2.0 MaskedTextBox.Mask property. I want to create a custom mask and have no idea which characters mean what and...
0
by: Mauricio C Vidotto | last post by:
I have an application that use MaskedTextBox Control. This control has Mask property value 9999999.99 and I would like to add numeric values with 2 decimal places. However, if I set Text property...
0
by: dumbo | last post by:
I do not succeed to modify the content of a MaskedTextBox control whose Property "OutputText" is in binding with field of type text of one table in database a MDB. The control has been generated...
1
by: Matt | last post by:
I recently came across what I believe to be a peculiar bug with Mdi Children, and wanted to see if anyone else had experienced this before sending it in. The issue is as follows: I have a number...
2
by: Jaime Rios | last post by:
Hi, I'm using C# to create a printable form. The data is coming from a XML source that I load when the application starts. I have no problems loading the data, but I am having a hard time figuring...
3
by: Mike Fellows | last post by:
I have a few masked textboxes within my application and I have the same problem with each and everyone If I tab to a masked textbox i have no issues, but when i click into a mask textbox the...
0
by: =?Utf-8?B?TWFyayBDb2xsYXJk?= | last post by:
I'm using the MaskedTextBox to make sure the user inserts a valid international phone number. I want to set the Mask property so that the user sees +49-__-____-____ in the text box. I set the...
1
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
We have some dumb and lazy people here, so I need help. To fix the dumb part: We have placed MaskedTextBoxes on the forms so they will stop entering the information incorrectly. Now the lazy...
1
by: eljainc | last post by:
Hello, I am trying to utilize a MaskedTextBox control on my form. I would like the user to enter numbers only (i.e. 65000), I set the Mask property as 999999 and the PromptChar as space (it...
3
by: =?Utf-8?B?UGFvbG8=?= | last post by:
I have a maskedtextbox (msktxtbxAmount)defined thus: Mask $#####.## and msktxtbxAmount.ValidatingType = typeof(System.Decimal) with a PromptChar of =. I have defined: decimal transAmount and the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.