Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox Inputmask
Message
From
28/04/2007 16:32:10
 
 
To
26/04/2007 10:57:41
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
Miscellaneous
Thread ID:
01219932
Message ID:
01220825
Views:
29
>That's a bummer! I'll post back here if I find anything that works for me.

Shouldn't be too hard to create a TextBox class that does this. You'll need to handle the KeyPress event, which fires for every key press ... then simply check the length and stop allowing entry of characters (by simply setting e.Handled = true) when the required length is reached and also change the case if necessary of the first character.

I'd set up a boolean property called ProperCase or something like that.

~~Bonnie



>
>>As far as I understood from reading threads here (I'm not working in .NET yet) there is no simple replacement for VFP Inputmask. Let us know what you would be able to "dig".
>>
>>Good luck!
>>
>>>Thanks Naomi,
>>>
>>>but a masked textbox doesn't seem to be what I am looking for. I have found code that will change the text when leaving the textbox, but I want it change automatically when typing. I guess I need to do some more digging.
>>>
>>>>>How do I set an inputmask in VB? I want to force the first character to uppercase and limit the number of characters to the length of the underlying (bound) field.
>>>>>
>>>>>In VFP I would do something like this:
>>>>>
>>>>>
THIS.InputMask= "!" + REPLICATE("X",LENC(EVALUATE(THIS.ControlSource))-1)
>>>>>
>>>>
>>>>Check
>>>>Re: Equivalent of VFP's Inputmask property in .NET Thread #1152503 Message #1152507
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform