Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textbox Inputmask
Message
De
28/04/2007 17:02:11
 
 
À
28/04/2007 16:32:10
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
Divers
Thread ID:
01219932
Message ID:
01220827
Vues:
18
Hi Bonnie,

I figured I'd have to use the KeyPress to "do it myself". Just haven't had time to dig into it since. Thanks.

>>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
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform