maskedtextbox

Windows Forms: Unable to Click to Focus a MaskedTextBox in a Non TopLevel Form

Like the title says, I've got a Child form being shown with it's TopLevel property set to False and I am unable to click a MaskedTextBox control that it contains (in order to bring focus to it). I can bring focus to it by using TAB on the keyboard though. The child form contains other regular TextBox controls and these I can click to f...

Winforms MaskedTextBox - Reformatting pasted text to match mask

I have a MaskedTextBox control that, in our case, is collecting social insurance (tax) numbers (without a ValidatingType though since the string representation including the mask literals). A social insurance number is 3 groups of 3 digits separated by dashes. Sometimes spaces may be typed or entered instead of the dashes. The configura...

Equivalent in vb.net's MaskedTextBox to cliptext property in vb6's Masked Edit control

I find this property useful but cannot find a direct replacement for it in vb.net. Is there one? Thanks ...

How to set Regex Expression as the Mask for a MaskedTextBox in C# ?

I want to set the Mask of MaskedtextBox from Regex expression. Such as i want a valid email, Decimal values and other regex expressions against a MaskedtextBox. ...

TextBox.SelectAll() does not work with TAB

To highlight the text I am doing maskedTextBox.SelectAll() for the events of "Enter" and "MouseDown" and it is working when I using the Mouse but I go to that text box by pressing the TAB key, it does not work what Am I missing in here? ...

How can I restrict the text entered into an input text element using jQuery?

I have an input text element being used as a jQuery UI datepicker with a custom date format. The date format allows months to be entered in as JAN, FEB, etc and so the constrained input allows all characters to go through. See this question. How can I restrict the text entered to match my date format "dd-M-yy"? Is there a way to use jQ...

How could I emulate an HTML password field (but one which fires keydown events)?

I need to be able to record keyboard events on elements that act like password (masked) inputs. It sounds sinister, but I assure you it's not. I am not a phisher or scam artist of any kind. My users will be made aware that there behaviour is being analysed and are instructed not to enter a password that they use anywhere else. With tha...

validating event getting fired twice in maskedtextbox vb.net

I am facing a issue while using the "validating" event of the maskedtextbox. I have an MDI form, in which there is a main form and another form acting as bottom bar. The bottom bar comprises of buttons for moving to "previous" and "next" forms. If suppose in the main form i have a maskedtextbox and the initial focus is set on it, then on...

Is it possible to use RadMaskedTextBox inside an AutoCompleteBox in Silverlight / Expression Blend?

It's probably doable, but with my n00b skills I couldn't figure this out yet. When I try to "Make Into Part" on the RadMaskedTextBox, Expression Blend complains that it's not a TextBox. How can I make it to use it as a proper control part? Can I "typecast" somehow in XAML? Thanks in advance for all help! ...

Returning a DBNull for a bound MaskedTextBox whenever type validation fails?

I have a MaskedTextBox control with the mask "00/00/0000", the PromptChar "_" and the ValidatingType of DateTime, bound to a DateTime column in a database that can also accept null values. I'd like the user to have to enter either a valid date, or leave it blank (i.e. "__/__/____") for a DBNull. By using the TypeValidationCompleted eve...

MaskedTextBox with PasswordChar defined, how to get the displayed string value?

I have a MaskedTextBox with the PasswordChar defined so that relevant characters are not displayed raw but instead have the defined PasswordChar used instead. Just like a traditional password entry field, except I have a Mask defined so that not all the characters are turned into the PasswordChar. I want to get the string that is actua...

Enter key pressed event handler

Hi. I want to capture the text from the textbox when enter key is hit. I am using WPF/visual studio 2010/.NET 4. I dont know what event handler to be used in the tag ? I also want to do the same for maskedtextbox. ...