Hi i am new to this

I created a masked text box but dont know how to define a mask

For example i want the textbox to allow only numbers and maximum size of input must be 4

Another would be that the maximum size should be 2 and it can allow values 0-9 and a-f (yes i am looking for hexadecimal input)

Is there a way i can make a Textbox or Masked Text Box to conform to a Regular Expression(System.Text.RegularExpressions)???

//Adds characters  0-9
private void myFirstForm1_Load(object sender, EventArgs e)
{
    maskedTextBox1.Mask = "00/00/0000";
}

the MSDN prob has everything you need if you read through it enough as adatapost has referenced. I know this limits imput from 0-9.

Jameson'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.