Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inputmask for hour
Message
From
16/01/2005 09:53:49
 
 
To
14/01/2005 19:11:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6
Miscellaneous
Thread ID:
00977403
Message ID:
00977586
Views:
36
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform