Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inputmask for hour
Message
De
16/01/2005 09:53:49
 
 
À
14/01/2005 19:11:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
00977403
Message ID:
00977586
Vues:
35
Hi Hilmar.

How do I specify an InputMask for an hour? I want to force the user to input data in the format 00:00, but when I use that InputMask, the TextBox never gets focus. As soon as I click on it, the focus goes to the next object in the TabOrder.

If you have a copy of 1001 Things You Wanted to Know About Visual FoxPro there is a control in Chapter 4 that does exactly what you want (including the validations{:

The true time spinner (Example: CH04.VCX::spnTime)

This control looks and acts just like the time spinner you see when using the Date/Time Picker ActiveX control that ships with Visual Studio. However, it has several features that make it more generally useful than the ActiveX control. First, this control does not require that it be bound to a field of the DateTime data type. As we have said, the best format for storing user entered time is in a character field formatted to include the universal ‘:’ time separator. The control can be configured to display and recognize either a 5-character ‘hh:mm’ format or a full 8-character ‘hh:mm:ss’ format and update either appropriately. This is controlled by a single property, lShowSeconds. Finally, because this is a native Visual FoxPro control it does not suffer from the inherent problems that haunt ActiveX controls with respect to the multiple versions of specific windows DLLs, nor are there any problems associated with registering the control.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform